You are here:  » Can't get feed to import

Support Forum



Can't get feed to import

Submitted by highlander on Tue, 2010-02-23 11:51 in

Hi David,

I have uploaded a file into my feeds folder and when I click register it has all the details of the first field present (so the feed is recognised).

However, when I perform the product mapping and click on register and trial import it is registering zero products.

I has previously uploaded a feed with same name with no problems but deleted it and deregistered that one. Has this caused this issue?

Thanks for your help

Regards
Jamie

Submitted by support on Tue, 2010-02-23 11:54

Hi Jamie,

If the first record is being displayed correctly, the main reason for a feed not importing any records is one of the required fields being missing (in this case in every record).

Does the sample record show valid values for each of the fields that you are registering as Product Name, Buy URL and Price?

If that all looks fine, if you could email me a link to the installation, any password required for /admin/ and the filename of the feed that is not importing i'll check it out for you...

Cheers,
David.

Submitted by highlander on Tue, 2010-02-23 16:18

Thanks David, you hit the nail on the head. I was incorrectly selecting a field with no value in it.

Unfortunately I now have a follow up query! The merchants I am using all have very high level categories which aren't much use for my site.

How would I go about creating my own categories. Do I need to set up a category map and add products into it one by one?

For example, one merchants category is outdoor wear (which incorporates coats, jackets, trousers, shoes etc for either gender) and I would like to have a category such as mens coats, womens coats, mens shoes, womens shoes etc. What is the easiest/quickest/best way to do this?

Submitted by highlander on Wed, 2010-02-24 11:10

can anyone help with my query please?

Submitted by support on Wed, 2010-02-24 12:09

Hello Jamie,

My apologies - not sure why I missed your follow up there; sorry about that.

Anyway, regarding setting manual categories; I assume that it would be too much work to manually assign a category for every product; however I do have a mod that will "dynamically" set the category based on keywords in the product name.

Do you think that would be suitable? The mod utilises the existing Category Mapping tool; but instead of looking for the keywords in the alternatives list in the category field, it uses the name field instead.

If you think that would be suitable; it's a very easy change to make, simply look for the following code on line beginning at line 203of includes/admin.php:

    /* apply category mappings */
    if (isset($admin_importCategoryMappings["=".$importRecord["category"]]))
    {
      $importRecord["category"] = $admin_importCategoryMappings["=".$importRecord["category"]];
    }

...and REPLACE with:

    /* apply category mappings */
    if (isset($admin_importCategoryMappings["=".$importRecord["name"]]))
    {
      $importRecord["category"] = $admin_importCategoryMappings["=".$importRecord["name"]];
    }

And then look for the following code on line 222 of the same file:

  if (strpos($importRecord["category"],$word) !== FALSE) $found++;

...and REPLACE that with:

  if (strpos($importRecord["name"],$word) !== FALSE) $found++;

With that in place; Category Mapping will work against the product name field instead of the Category field. Each line of the alternatives box for a "master" category can then contain keywords, and if all are found in the product name the product will be imported with that master category. It will also support the "=" prefix, so if you have an alternative of "=Product Name" (without the quotes), that product will be imported with the corresponding master category name.

Hope this helps!

Cheers,
David.

Submitted by highlander on Wed, 2010-02-24 14:37

Thanks David, as a really dumb follow up question how would I manually assign a category for every product? I thought i could do this via creating my own category maps but this doesn't seem to be working.

Submitted by support on Wed, 2010-02-24 15:13

Hi Jamie,

That should be working with the above modification. Go to "Category Mapping", and enter a new category name, or click "Configure" alongside an existing one.

Then, in the alternatives box, enter product names for that category one per line, preceded by "=", for example:

=Product 1
=Product 2

...and after the next import (mappings are applied at import time, not in real time), Product 1 and Product 2 should be imported with the specified category.

If that's not working, if you could email me your modified includes/admin.php i'll check it out for you...

Cheers,
David.