This is in product-form and the below code output product variant. I want to add a if-else condition to add another class on top of it.
<label
for="option-{{ section.id }}-{{ forloop.parentloop.index0 }}-{{ forloop.index0 }}" class="SizeSwatch">{{ value }}
</label>
Mgroup
2
Hello,
Bellow you may find updated code.
In this case, if your condition true, the “Your_class” class will be applied .
Note that both “SizeSwatch” and “Your_class” classes will be applied
I don’t see the full code but this seems to be enough.
I hope that my answer helps you to resolve the issue. If you need a more detailed explanation or further help - just contact me or my company by email