Hi
I'm having a problem with the product mapping feature. I have four of the same product from different feeds and have managed to map 3 of them together, but the fourth one doesn't seem to be working. I've created the one Product Map and added all four products that I wanted to map together, but it ignores the fourth one.
Any ideas what I could be doing wrong?
Thanks.
Hi Paul,
There is a scenario that I am aware of that can cause this to happen if the original name contains a string of excess spaces; and is a result of the way HTML interprets a string of spaces of any length as a single space character.
To fix this, here is the code for a new filter that will trim excess spaces from anywhere within a field. Copy the code, and paste into the end of your includes/filter.php file, just before the closing PHP tag.
/*************************************************/
/* Trim Spaces */
/*************************************************/
$filter_names["trimSpaces"] = "Trim Spaces";
function filter_trimSpacesConfigure($filter_data)
{
print "<p>There are no additional configuration parameters for this filter.</p>";
}
function filter_trimSpacesValidate($filter_data)
{
}
function filter_trimSpacesExec($filter_data,$text)
{
return trim(preg_replace('/[ ]{2,}/',' ',$text));
}
This will add a new filter "Trim Spaces" to your installation. Next, click Filters alongside the feed containing the product that isn't mapping as expected; and add a new Trim Spaces filter to the Product Name field. Finally, re-import the feed and if this is the cause of the missed mapping that should resolve the problem!
Hope this helps!
Cheers,
David.
--
PriceTapestry.com