Developer forum

Forum » Ecommerce - Standard features » Variants - variant combinations - with separate dropdowns

Variants - variant combinations - with separate dropdowns

Sonni Tost
Reply

Hi all,

We have a client that has products that come in different colours, sizes and the likes.

For example:

A product can come in the following variants:

COLOUR / GLAS TYPE / TOP

Default color / plastic glas / no top
Default color / plastic glas / with top
Default color / real glas / no top
Default color / real glas / with top
Black / plastic glas / no top
Black / plastic glas / with top
Black / real glas / no top
Black / real glas / with top

I am aware of the variantcombinations that actually solves this - but the client would like (read insists) the customers to be able to select the single attributes separately - ie. a dropdown with Colour - a dropdown with Glas Type and a dropdown with Top.

When I use the variantoption it gives me all the variant options - and not just the ones that applies for the current product.

Is there a way to sort of combine the variantcombinations with the variant options so that the customer can select each variant separately - and only the variants that relates to the product?

Kind regards

 

Sonni T.


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Sonni

The variantgroups and variant options will give you data on what options should be in the 3 dropdowns. Variant combinations just tells you which combinations that are valid.

That needs to be combined in the frontend using a Javascript.

Attached is a VERY old template (2006) that does this - but it should still work.

 
Sonni Tost
Reply

Hi Nicolai,

It was not excactly what I needed - but it pointed me in the right direction though.

My client does not need the dropdowns to be co-dependant - but need the dropdowns to be individually selectable - but to maintain the options after reload. I have made a jQuery version that does this - now I just have to test it :-) But it looks promising.

Thank you for your help.

 

Sonni T.

 

You must be logged in to post in the forum