Hello,
I'm trying to remove the decimals from the price in product.liquid from Supply theme.
In other templates we only need to add " | remove '.00' " but in supply theme is not working:
This is the code that shows the price in product.liquid:
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">;
{% assign variant = product.selected_or_first_available_variant %}
<meta itemprop="priceCurrency" content="{{ shop.currency }}">
<meta itemprop="price" content="{{ variant.price | money_without_currency }}">
<ul class="inline-list product-meta">
<li>
<span id="productPrice" class="h1">
{% include 'price' with variant.price %}
</span>
</li>
{% if product.compare_at_price_max > product.price and settings.product_show_saved_amount %}
<li>
<span id="comparePrice" class="sale-tag large">
{% assign compare_price = variant.compare_at_price %}
{% assign product_price = variant.price %}
{% include 'price-sale' %}
</span>
</li>
{% endif %}
{% if settings.product_reviews_enable %}
<li class="product-meta--review">
<span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
</li>
{% endif %}
</ul
Someone knows what i need to change?
Thanks!
Hi Albert,
Britton here with the Shopify support team.
There actually should be an easier way to do this than changing your theme's code. If you visit Settings > General in your store and scroll down you will need to click on change formatting. From there, format your currency like this: https://screenshot.click/26-31-qhg68_27rwp.jpg. That should get rid of the decimals on your prices.
I hope that helps!
-Britton
User | Count |
---|---|
791 | |
137 | |
93 | |
64 | |
60 |