2

This is a very special problem I met in Prestashop. I have a product, let's say a two color wooden stick, which is a normal 10" long stick. Half of it (5") can be blue and the other half red for example.

My product is this: Two color wooden stick. I have the following features: color 1 and and color 2 .

In the admin at the product's features I check red for the color 1 and blue for color 2.

Now the problem: when user filters using layered navigation, maybe they select blue for color 1 and red for color 2. This will result displaying 0 products as our wooden stick is inverse, but in the reality it's the same product.

How could I make that possible without duplicating the wooden stick product?

Ervin
  • 2,374
  • 4
  • 30
  • 44

1 Answers1

1

I see there is mismatching, your product 10" is not blue OR red, but blue-red in same time, so set two different colors is bad idea, instead I can propose you to do next, I hope when you said that you use color features it is named in Presta backoffice attributes, there is the difference between two this things in Presta, so:

  • in Catalog -> Product Attributes create new P.Attribute with name Color and for last option choose Color or textures in dropdown

  • add new Value for this new Color p.atrribute named e.g. "blue-red" and upload texture (img) that contains both colors. Repeat this procedure as much as needed.

  • in Layered navigation use this new p.attribute instead old

OR

another idea, create using same way 2 different color attributes Color1 and Color2, no textures, just use real separate colors there like "red", "blue". Then in product create combinations of this two colors and assign it to product.

In this case in layered navigation you will can set 2 filters - Color1, Color2 and customers will can to choose it. But, imho, first solution is better for UX.

Serge P
  • 1,863
  • 13
  • 14
  • Thank Sergii for your time I really appreciate. my real problem with this is that I really need these two filters as features. The reason is that after I select these two features and get the wooden stick product I still have 3 more filters inside the product (as attribute combinations) and I Don't want to overwhelm the product with attributes . There are 2 more reasons for having like this do I really need to have them filtrable before stepping into the product. – Ervin Jan 30 '16 at 07:36
  • my real example is a bit more complicated, its not even color the features I have but I didnt want to write too complicated example here :) – Ervin Jan 30 '16 at 08:39
  • @Ervin now clear. In this case I can propose you next, create custom solution or use e.g. module "Advanced Features Values - by Jérôme Danthinne, Allows multiple values selection per feature, and features values ordering" (that I saw in one of my clients shop). Main idea: module allows to choose multiple values per feature for product. Also it contains overriden methods for layered module. So in this case you will can select two colors for Color (without 1,2 indexes) feature and layered will works with these values correctly. – Serge P Jan 30 '16 at 12:22
  • @Ervin another idea, customize layered module with logic: 0) we assume that Color1 colors same as Color2 colors 1) Show on frontend only e.g. Color1 checkboxes with name "Color", make Color2 hidden 2) when customer select something in Color filter, check if Color2 (hidden) values also have current value, set it and let module logic do next. In this case you will have selected e.g. "blue" color in both filters and customer will see all needed products. That is easiest solution that I can imagine now, without buying a module – Serge P Jan 30 '16 at 12:32
  • wow Sergii, thank you :) The second one seems complicated for me, I'm going to test the Advanced Features Values, I'll be back with an answer when tested. Thanks again for your time. – Ervin Feb 04 '16 at 15:58
  • Hi Sergii, its been a while since you gave me the solution. The advanced feature module is great, though I have some problems with it: If I have it like this: color1: RED and BLUE, color2: RED and BLUE, I could have the folllowing situation: the user wants a stick with BLUE on both of the sides: BLUE X BLUE. In this case it will list my RED x BLUE stick as a result, though its not good. Do you think I could make a solution for this case? Thanks!! – Ervin Sep 30 '16 at 10:32