Output variant values as links
For each dependent variant, create a loop that outputs its values along with a link. The surrounding bracketPR-DepVariationName1 ensures the block only appears when this variant exists for the current product.
Within the loop, PR-DepVariationOptionSelected1 highlights the value that has already been chosen. Without this marker, the customer would not see where they currently are.
style attribute set directly, because you maintain the appearance in one place in the stylesheet rather than in every variant block.
Hidden input fields in the product form
Inside the product form, additionally place the tagPR-PrintHiddenDepVariations.
Tags
Related topics
- Guide: Display variants
- Guide: Reload dependent variants via AJAX
- Guide: Display dependent variants as select lists
- Guide: Display dependent variants as a table
