Hi David,
I'm trudging through the product matching for over 150,000 items and I keep running into the same scenario where Men's and Mens or Women's and Womens only partially match each other.
I say partially because on the product pages stores offering either version show up together but on search results pages the items are treated as different with only the ' character being different.
Would an sql command to remove the apostrophe from all titles be the best option or is there a better way? If SQL works best what should the query be?
Thanks again,
Gem
I had a feeling there was an easier way, buying this script is giving me a great refresher on php code too. I'm sorry about taking advantage of the awesome level of support you offer but I hope at least some of my questions give you feature ideas for future releases :-)
Thanks again
Gem
If i want to remove or replace more than just the '
for example :
can i put like this?
$importRecord["name"] = str_replace(":","",$importRecord["name"]);
and for ,
$importRecord["name"] = str_replace(",","",$importRecord["name"]);
or can i put all in one line?
Hi,
Yes - you can do it all on one line like this:
$importRecord["name"] = str_replace(array(":",","),"",$importRecord["name"]);
Cheers,
David.
Hi Gem,
It would be easiest (and avoids having to add filters to every single feed) to remove the apostrophes during import, immediately before the normalsied version of the product name is created. In includes/admin.php, look for the following code starting at line 271:
/* create normalised version of product name for use in URLs */
$normalisedName = tapestry_normalise($importRecord["name"]);
...and REPLACE with:
$importRecord["name"] = str_replace("'","",$importRecord["name"]);
/* create normalised version of product name for use in URLs */
$normalisedName = tapestry_normalise($importRecord["name"]);
Cheers,
David.