You are here:  »  associate products manually

Active Forum Topics


associate products manually

Submitted by Tobix on Fri, 2020-02-07 21:03 in

Hello considering that finding products with the same name is difficult and that many affiliations do not put the EAN code, wouldn't it be correct to enhance more "Product Mapping" such as inserting a search string to easily find the product to be modified?
How can I do?

I am willing to manually associate all the products of my comparator

Submitted by support on Mon, 2020-02-10 08:35

Hello Tobix,

Product Mapping is keyword match by default. To make an entry in the alternatives list an exact match it can be preceded with "=" (this is done automatically when you use the search tool to find products and add to the list) so in Alternatives e.g.

keywordmatch1
multikeywordmatch1 multikeywordmatch2
=Exact Product Name Match

There are a couple of changes you can make to the keyword matching. By default it is case sensitive but to make case insensitive, edit includes/admin.php and look for the following code at line 283:

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

...and REPLACE with:

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

Alternatively, to make case insensitive and whole word match only, REPLACE with:

  if (preg_match("/\\b".preg_quote($word)."\\b/i",$importRecord["name"]) $found++;

Cheers,
David.
--
PriceTapestry.com

Submitted by Tobix on Tue, 2020-02-11 18:25

I make an example

runner sneakers
= adidas sneakers runner db10293

The first group all the products that are called "sneakers runner" (do I have to leave the space or not?)
Thank you

Submitted by support on Wed, 2020-02-12 08:12

Hi,

That's correct - you do need the space in this case as the code that applies Product Mappings splits the alternative into words and then checks for all words in the product name, regardless of order.

Cheers,
David.
--
PriceTapestry.com