You are here:  » Remove Price (required field)

Support Forum



Remove Price (required field)

Submitted by mally on Fri, 2008-09-19 10:03 in

Hello David

Price field is currently a required field, how do I remove from being required?

thanks

mally

Submitted by support on Fri, 2008-09-19 14:14

Hi Mally,

3 modifications are required to make Price an optional field. Firstly, in admin.php, comment out or DELETE the following code, starting at line 32:

    if (!$fieldPrice)
    {
      return "fieldPrice missing";
    }

Then lower down in the same file, at the top of the import record handler, the required fields are checked in the current product record by this code (lines 155/156):

    /* check product record for minimum required fields */
    if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]] || !$record[$admin_importFeed["field_price"]]) return;

REPLACE this with:

    /* check product record for minimum required fields */
    if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]]) return;

Finally, in admin/feeds_register_step2.php, DELETE the following code from line 33:

    widget_required("fieldPrice");

Cheers,
David.