Hi,
I'm wondering if it is possible to make variants display in two different dropdowns.
The two variantgroups could be "size" and "color".
When "size" is picked in the dropdown either a post is made with the first variant "VO1" or it just stay selected.
With the first variant "VO1" is chosen I only wan't to display the actuall variant compinations in the other dropdown "color".
I've tryed making this in jQuery and advanced xslt, but i can't seem to get the result that I've just described.
Any good ideas?
It's quit simple to make this variant picker in the same dropdown, with both varianttext listed. fx. "size - color" but it doesn't look that fancy.
I'm running DW 7.2
/Rasmus
Developer forum
E-mail notifications
VariantGroups and Variant compinations
Posted on 11/01/2011 14:45:00
Replies
Angel
Posted on 26/01/2011 07:58:09
Deleted by moderator...
Nicolai Høeg Pedersen
Posted on 26/01/2011 09:00:45
Hi Rasmus
In the frontend product template you have 2 options for creating variant selection in 2 different loops. VariantCombinations contains all combinations of all the variant groups. So small-blue small-red medium-blue etc.
Instead of using VariantCombinations you can use the VariantGroups loop - that will give you a list of variant dimensions (Size and Color) and inside that loop you can use VariantOptions to display the options of the dimensions (Size: Small, Medium - color:blue, red).
You can take it even further by using the VariantGroups/VariantOptions loops to generate 2 or more dropdowns, and with javascript go through the available combinations in VariantCombinations loop. So when selection size small, only the colors available in that size will display.
Attached a template with the 2 different implementations.
In the frontend product template you have 2 options for creating variant selection in 2 different loops. VariantCombinations contains all combinations of all the variant groups. So small-blue small-red medium-blue etc.
Instead of using VariantCombinations you can use the VariantGroups loop - that will give you a list of variant dimensions (Size and Color) and inside that loop you can use VariantOptions to display the options of the dimensions (Size: Small, Medium - color:blue, red).
You can take it even further by using the VariantGroups/VariantOptions loops to generate 2 or more dropdowns, and with javascript go through the available combinations in VariantCombinations loop. So when selection size small, only the colors available in that size will display.
Attached a template with the 2 different implementations.
Posted on 31/01/2011 09:52:16
Hi Nicolai,
We have played a bit around with those variants.
The variant group is great, but the main problem (correct me if I am wrong). is that the variants get very confusing for the customer if there is many colors and many sizes.
ie:
blue 38
blue 39
blue 40
blue 41
red 38
red 39
red 40
red 41
yellow 38
and so on.
I have seen that some DW shops, solves the problem by creating a seperat product for each color, then there will only be one variant.
What we have seen in other e-shop, is this setup (see attachment). where one dropdown is the first variant, and next dropdown is second.
We are planning to make a .NET module for this, and I would like to hear your input to how we can make this. ?
thanks :-)
We have played a bit around with those variants.
The variant group is great, but the main problem (correct me if I am wrong). is that the variants get very confusing for the customer if there is many colors and many sizes.
ie:
blue 38
blue 39
blue 40
blue 41
red 38
red 39
red 40
red 41
yellow 38
and so on.
I have seen that some DW shops, solves the problem by creating a seperat product for each color, then there will only be one variant.
What we have seen in other e-shop, is this setup (see attachment). where one dropdown is the first variant, and next dropdown is second.
We are planning to make a .NET module for this, and I would like to hear your input to how we can make this. ?
thanks :-)
Nicolai Høeg Pedersen
Posted on 31/01/2011 10:05:40
Hi Peter
The feature is already there...
Dynamicweb have 2 approaches in the template for making variants:
- Variant combinations with one list of all available variants.
OR
- Variant Groups, meaning x-number of dropdowns for each dimensions, i.e. Color dropdown and Size dropdown etc. Just like your attached screendump.
Both versions are available in the template of my previous post.
The feature is already there...
Dynamicweb have 2 approaches in the template for making variants:
- Variant combinations with one list of all available variants.
OR
- Variant Groups, meaning x-number of dropdowns for each dimensions, i.e. Color dropdown and Size dropdown etc. Just like your attached screendump.
Both versions are available in the template of my previous post.
Posted on 31/01/2011 10:39:39
You need to be aware of performance problems in eCommerce...
eCommerce does not read variant combinations from cache, but executes two requests for each combination in the loop... for each and every product in a list.
/Morten
Posted on 31/01/2011 10:43:42
That's excellent :-)
Posted on 31/01/2011 10:44:54
@Morten
Is there anything special we can do about this?
Do you mean that if a product card has 20 variants, then there will be 40 request to the server?
Is there anything special we can do about this?
Do you mean that if a product card has 20 variants, then there will be 40 request to the server?
Posted on 31/01/2011 11:17:34
Yes, if you have variants in 5 colors and 4 sizes (20 combinations), that will result in 40+ requests when rendering variants for a product.
You could make a custom rendering of cached variants using a ProductTemplateExtender.
/Morten
You could make a custom rendering of cached variants using a ProductTemplateExtender.
/Morten
Posted on 31/01/2011 11:27:25
@Morten,
ok. do you have a suggestion to how this could be done? just in suggestions.. :-)
ok. do you have a suggestion to how this could be done? just in suggestions.. :-)
Posted on 31/01/2011 11:43:40
No, sorry - i don't have a solution for you :)
Just to clarify, it's 40+ sql queries, not http requests.
/Morten
Just to clarify, it's 40+ sql queries, not http requests.
/Morten
You must be logged in to post in the forum