You are here:  » Map feed in category


Map feed in category

Submitted by tonyver on Wed, 2008-09-17 09:42 in

Hello David,

Is it possible to map a complete feed in a category made by category mapping.

So, if i have made with category mapping the category X
is it then possible to import a feed of merchant Y complete in category X.

I receive feeds of a merchant without category names and prices, so i want to put them
in the created categories.

Is it also possible to make field price not required during the import.

Best regards,

Tony

Submitted by support on Wed, 2008-09-17 11:40

Hello Tony,

When you register a feed, you can specify a single category value to use for all products - rather than selecting a field; just enter the required category in the box - that should be all you need to do.

To make the price field not required; look for the following code on line 156 of includes/admin.php:

    if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]] || !$record[$admin_importFeed["field_price"]]) return;

...and replace this with:

    if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]] ) return;

That should do the trick!

Cheers,
David.

Submitted by tonyver on Wed, 2008-09-17 12:42

Thanks, for your quick reply.

It works.

Regards,

Tony

Submitted by tonyver on Thu, 2008-09-18 12:04

Hai David,

The part with the price field not required doesn`t work, i did the replacement but the price field is still required.

I also tried to remove the required widget in file feeds_register_step2.php,
In this situation the field isn`t required, but the system doesn`t import the feed anymore.

Regards,

Tony

Submitted by support on Fri, 2008-09-19 07:55

Hello Tony,

My apologies - I misunderstood making the price field not required as just checking the price field during import; not that you wanted to make it optional at registration.

In addition to removing the widget_required() call in feeds_register_step2.php; you will also need to remove the following code from includes/admin.php, starting at line 32 (within the admin_register() function):

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

After doing that, the price field should be entirely optional.

Cheers,
David.

Submitted by tonyver on Fri, 2008-09-19 08:56

You`re the man

Best Regards