Hello,
im trying to make a script to change text for id “texto-variante” when a variant is selected. i already make a script thats work when you press the variant but i need to show the text when you enter the product and the variant is already selected by default.
So when enter to the product the text with the id “texto-variante” is blank, but when i select a variant it change it.
{% form 'product', product, class:form_classes, novalidate: 'novalidate' %}
{% unless product.has_only_default_variant %}
{% for option in product.options_with_values %}
{% assign option_position = forloop.index %}
{%- for value in option.values -%}
-
{%- endfor -%}
{% endfor %}
{% endunless %}
Hope someone can help me.
Regards,