Personalized checkout and custom promotions with Shopify Scripts
Hello all,
I try to show the variants weight on my product page cause i update my theme atm. Problem is that the way i did it before not working anymore and i wasnt able to figure out why. I started over but there are some strange things.
1. I tried to use {{ variant.weight | weight_with_unit }} like before.
Made a new snippet with code:
<div style="font-size: small;">
<p>Gewicht pro Artikel:
<span id="weightpreview">{{ current.variant.weight | weight_with_unit }}</span>
</p>
</div>
2. -> render the snipped at main-product.liquid at the place i wanted
3. Output: "Gewicht pro Artikel: 0.0"
If i paste the code directly somewhere at the bottom from main-product.liquid it shows the weight suddenly but not updating it when switching the variant. And before i go to my .js question i need to know why its not showing
at least the first weight when i render the snippet.
Hope its somehow understandable and anyone knows the trick or some link with infos.
Hello,
I've got the same problem with dawn theme:
current.variant.weight doesn't work at all and shows 0 g.
product.selected_variant.weight works like
product.selected_or_first_available_variant.weight and like
product.variants.first.weight - it shows the weight of the first variant.
So I'm stuck at the moment. I use custom liquid.
The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024