Developer forum

Forum » Templates » Produclist Variantloop outputs all variants and not just active variants on a product?

Produclist Variantloop outputs all variants and not just active variants on a product?


Reply

 

Snippet:

http://pastebin.com/m333ae581

 

Trying to get the variants listed in a dropdown box, which works fine except that it lists all avalible options and not just the once activated in the backend why is that?


Replies

 
Reply

Hum... I don't know if there is a clever answer to your question "Why is that". This is peraps not the most intuitive behavior, so we've registered it as a bug to be fixed so you only get the ones that are valid on the current product.

 

Judging by your template code I assume you want to create a select box for each variant group listing the variant options under each group? I don't think we can hack this temporarily until the bug is fixed, but in the meantime please try the VariantCombinations loop instead.

 
Reply
Sorensen wrote:

Hum... I don't know if there is a clever answer to your question "Why is that". This is peraps not the most intuitive behavior, so we've registered it as a bug to be fixed so you only get the ones that are valid on the current product.

 

Judging by your template code I assume you want to create a select box for each variant group listing the variant options under each group? I don't think we can hack this temporarily until the bug is fixed, but in the meantime please try the VariantCombinations loop instead.


Allright, we have created an TemplateExtender method where we create our own looptags etc. to get the variant options out, however its kinda messy to do that to beable to use standart functionality. But good to hear that this issue will be resvolved. :)
 

 

You must be logged in to post in the forum