DIsplay selected variants weight on product page

Highlighted
New Member
1 0 0

Hi,

I try to display the weight of the selected variant on the productpage.

Atm i stuck here: 

{% for variant in product.variants %}
<span style="font-size: small;">{{ variant.weight | weight_with_unit }}</span>
{% endfor %}

Outcome:

 weight.jpg

Anyone an idea to only show the one weight from the selected variant. I tried google and the search but couldn't find a working solution.

 

//EDIT:  Solution found! Can be closed. Needed to add some javascript.

0 Likes