You are here:  »  Preference Product mapping


Preference Product mapping

Submitted by Tobix on Mon, 2020-04-13 10:56 in

Hi when I look for an article on my comparator I would like to see the first product in the product mapping.
Example:

if I am looking for Frigo Beko

Fridge Beko 01 (mapping product)
Fridge Beko 02 (mapping product)
Frigo Beko 03 (from feeds)

Submitted by support on Tue, 2020-04-14 06:30

Hi Tobix,

The main name of a Product Mapping entry is the name applied to all products matching the Alternatives list on the configuration page for a mapping; so in this case, if you create a new Product Mapping with the name Fridge Beko 01 and then as Alternatives on the configuration page, just;

Fridge Beko 02
Frigo Beko 03

...they would all be imported and compared as Fridge Beko 01...

Cheers,
David.
--
PriceTapestry.com

Submitted by Tobix on Tue, 2020-04-14 09:41

maybe I explained myself male sorry David!
I said in the search results I see first the single feed products and then the ones that I have manually grouped through Mapping Product. I wish those I have in the mapping are seen first

Submitted by support on Tue, 2020-04-14 09:56

Hello Tobix,

This might conflict with your other question about sort, but there is a mod in this comment to make the number of merchants the default sort so most compared products are shown first...

Cheers,
David.
--
PriceTapestry.com

Submitted by Tobix on Tue, 2020-04-14 11:23

Then I accept your advice on how I can solve this problem ... Go to the category and click on "Coffee machines" I would not like to see them in alphabetical order but at random ... How can we do it?

{link saved}

Submitted by support on Tue, 2020-04-14 11:43

Hi Tobix,

Assuming you have added the above mod (from node 5016) to order by compared products (numMerchants) for normal queries, then you change the default to a random order for category results, again in search.php look for the following code around line 97:

   $parts = explode(":",$q);

...and REPLACE with:

   $orderByDefault["rand"] = "RAND()";
   $parts = explode(":",$q);

And then the following code at line 20:

          $orderBySelection = $orderByDefault;

...and REPLACE with:

          $orderBySelection = $orderByDefault;
          if (($parts[0]=="category") && ($sort=="numMerchants"))
          {
            $sort = "rand";
          }

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Tobix on Tue, 2020-04-14 12:22

unfortunately it doesn't work :(

Submitted by support on Tue, 2020-04-14 12:34

Oooops - sorry, the last line of code in the replacement was incorrect;

            $sort=="rand";

...should be:

            $sort = "rand";

(corrected above)

Cheers,
David.
--
PriceTapestry.com

Submitted by Tobix on Tue, 2020-04-14 12:37

nothing I always see everything in alphabetical list

Submitted by support on Tue, 2020-04-14 12:39

Hi Tobix,

I think there are a couple of changes they may be conflicting now - please can you email me your current search.php and I'll check it out further with you...

Thanks,
David.
--
PriceTapestry.com