You are here:  » product mapping not working when dash in the name


product mapping not working when dash in the name

Submitted by tobyhage on Sun, 2017-06-11 09:37 in

Hello,

I think i have found a small bug. When there is a dash sign in the productname (used as alternative)
product mapping is not working.
I'am right? Or is there another problem at my side.

Submitted by support on Sun, 2017-06-11 10:22

Hi Toby,

Product Mapping alternatives use the unmodified feed name so hyphens should be fine however something I have come across before is where the hyphen is not the ASCII "-" (minus sign) but one of the extended UTF-8 character set hyphens;

UTF-8 Hyphen:

UTF-8 Non-breaking Hyphen:

In some cases, this can become translated by browsers, so this could occur even if using the search form on the configuration page for a product mapping to locate the alternative and then clicking to add the product name as an exact match alternative. To check for this, copy and paste each of the above UTF-8 hyphens in turn directly into and overwriting the hyphen in the Alternatives box, save the mapping and re-try. If the mapping is still not being applied let me know and I'll check it out further with you...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by tobyhage on Sun, 2017-06-11 20:39

David,

I have tried both hyphens. Still not working...
I have copied the name from html source to alternatives box, also no success.

I have removed the hyphen completely with search replace (works) and changed the product mapping and still not working. So it has nothing to do with hyphen.

But still no clue why it is not working....

Submitted by support on Mon, 2017-06-12 09:57

Hi Toby,

The other HTML translation issue that can come into play here is multiple spaces - since HTML treats any sequence of 2 or more spaces as a single space, product names containing multiple spaces would be copied - both from the product page or by selection from the search box on the configuration page for a product mapping - with a single space.

As you now have the Search and Replace RegExp filter in place in answer to your earlier question regarding deep links in the description, this can be used to replace any sequence of 2 or more spaces with a single space. Add as a global or per feed filter to the Product Name field configured as follows;

Search:

/[ ]{2,}/

...and in the Replace box, a single SPACE character. Make sure that this is last in sequence following any other filters affecting the Product Name field...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by tobyhage on Tue, 2017-07-25 20:36

David,

I did some research for this issue. I have found the following:

There is also a exclamation mark in the product name. When i look in the database the field "name" contains:

"DJI Phantom 3 Advanced quadcopter RTF - Super Aanbieding"

and the field "orginal_name" in the database contains the value:

"DJI Phantom 3 Advanced quadcopter RTF - Super Aanbieding!"

Is it because of this extra exclamation mark that the mapping functionality is not working?

Submitted by support on Wed, 2017-07-26 08:07

Hello Toby,

I just did a Product Mapping test with that exact name and worked OK, but if it is down to UTF-8 there could be translations in the copy / paste. Please could you email me the feed containing the "DJI Phantom 3 Advanced quadcopter RTF - Super Aanbieding!" product and also the .xml file created by the Backup and Restore featured (/admin/ > Tools) with just the productsmap table selected - that way I'll be able to exactly re-create your product mapping on my test server and check it out further for you...

Thanks,
David.
--
PriceTapestry.com