You are here:  » CSV feed skips some product items


CSV feed skips some product items

Submitted by pricingx1 on Wed, 2017-05-10 05:23 in

Hello ..
i just found that my CSV skips some items.
i tried with other csv format like "pipe" and "comma"..
but still the Issue is same..
i also checked if the imported data and skipped data have some difference.. but both seems to be same format and data..
please help me to solve the issues..

Submitted by support on Wed, 2017-05-10 07:55

Hi there and welcome to the forum!

For a product to be imported the record must have valid values for the minimum required fields of Product Name, Buy URL and price, and further the product name must be unique on a per merchant basis.

You can check what is causing records to be dropped using the Parse Analysis tool - from /admin/ go to Tools > Feed Utilities and then click Parse Analysis alongside the filename of the CSV feed you are working with. The tool will report the reasons for any dropped records, and in the case of a product name being duplicate will provide a link to view the record to help with your analysis.

If it is because of duplicates, it may be possible to use Filters, specifically Text Before / Text After to combine the value of other fields (they don't necessarily have to be fields that are registered into the database). This is a common scenario with, for example, clothing feeds; where you have a generic product name e.g. "Jumper", and then a color field. The color field can be combined with the product name to generate the unique name, for example using a Text After filter configured as follows;

" %color%"

...without the quotes, but notice the SPACE at the front which is important in order to separate the color from the product name. In this example "color" is the actual name of the field in the feed; which you can copy from the sample data shown below the form on Feed Registration Step 2...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by pricingx1 on Wed, 2017-05-10 12:37

Hello David..

Thank you so much for your quick response.. :)
it solved my issues ...
i was getting duplicate product names there..
one more issue i am having is ..
the import function is not importing category field in right way ..
the field looks something like this "Möbel > Betten & Zubehör > Betten & Bettgestelle"
and its not importing special characters like "%, >"

Submitted by support on Wed, 2017-05-10 13:01

Hi,

> the import function is not importing category field in right way ..
> the field looks something like this
> "Möbel > Betten & Zubehör > Betten & Bettgestelle"
> and its not importing special characters like "%, >"

This is two separate issues;

Firstly, regarding character sequences such as "ö" appearing on your site; this normally indicates that the datafeed is in a different character encoding to the site. The script defaults to utf-8 (which is configurable at line 4 in config.php) as this is by far the more common encoding and in this case, the feed is most likely to be iso-8859-1 encoded.

Assuming that this only affects one particular feed and other feeds are working fine, rather than change the character encoding of your site first try adding a UTF8 Encode filter to the Category field for this feed. This will convert ISO-8859-1 encoding to UTF-8 and the text should then appear as expected.

Regarding special characters not being imported; the category field is "normalised" at import time using the same function that creates search engine friendly clean product names for use in the product page URLs, and this removes characters such as &, > etc.

They can be permitted easily with a simply mod - to do this, edit includes/admin.php and look for the following code at line 199:

  $importRecord["category"] = tapestry_normalise($importRecord["category"]);

...and REPLACE with:

  $importRecord["category"] = tapestry_normalise($importRecord["category"],"&>");

(include in the new second parameter to tapestry_normalise() "&>" any additional special characters you required in category names)

One final thing to bear in mind here is that for performance reasons, the category field is limited to 32 characters in order that it can be included in a compound index which significantly improves search performance, and where you have a hierarchical category name as is the case here it is most likely going to be longer than this so I would suggest in this case using an Explode filter to extract the lowest level sub-category to use as the feed category from this feed.

To do this, with the above modification in place to permit the ">" character, add a new Explode filter to the Category field for this feed. On the configuration page for the filter use an Explode Character or String value of:

" > "

- without the quotes, but notice the spaces either side of ">" which will ensure that the extracted sub-category value does not have leading or trailing spaces.

...and a Return Index value of:

-1

This will return the last value of the ">" separated list, so the lowest level sub-category...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com