Compare at price not showing for markets - studio theme

Compare at price not showing for markets - studio theme

PerhapsG2023
Visitor
2 0 0

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/ 

Replies 2 (2)

AXPn
Tourist
6 0 0

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.

AXPn_0-1715561870677.png
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.

gamoki
Visitor
1 0 0

Sorry, but where do I put it exactly in the liquid??