Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, I'd like to be able to display compare at price on my store with the studio theme. I sell on multiple markets but it's only showing on the customize mode of the default theme. I tried every single things that I saw online. (Setting up the compare at price in the pricing section, allowing the EU market to show the compare at price, discount apps) can someone help with this please ? here's my url https://perhapsgallery.xyz/
Fu*k*ng solved finally!
Of course getting the classic compare at price doesn't work, I lost 2h trying to get it every way possible.
So, you need to create a metafield like that 👇 (at the product level, I mean it's faster instead of doing it for every variant), call it "Compare price", choose money as a type.
then you need to built you own section of course (would have been too easy otherwise) but actually ChatGPT did it perfectly for me.
Just tell him to display your price, add some logs in case he doesn't get it correctly, you will succeed at some point.
finally he ended up giving me this:
<div class="tossit-price-wrapper">
<span class="tossit-product-price">{{ variant.price | money }}</span>
{% assign product_compare_price = product.metafields.custom.compare_price.value %}
{% if product_compare_price and product_compare_price > variant.price %}
<span class="tossit-compare-price">{{ product_compare_price | money }}</span>
{% endif %}
</div>
And the beauty of that is that the currency are converted, hallelujah!
Shopify still sucks a lot the price we pay it, 2300$ / month to finally rebuilt everything yourself ... feeling f**ked.
If you wanna check the result, go to tossit.game and get yourself one of our cool games. Cheers guys.
Sorry, but where do I put it exactly in the liquid??
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024