Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
@PetervdHoeven - can you please check price format in your store settings? also may need to use price filter "money_without_trailing_zeros" in your theme code for price.
The price format only allows me to completely remove the last two decimals with “{{ amount_no_decimals }}” so it looks like “39”, is there a way to add “,-“ after the price? I currently use {{ amount }}.
How should i use price filter "money_without_trailing_zeros" in my theme code?
@PetervdHoeven - can you put like this in your price format and check ? {{ amount_no_decimals }},
so add "," after {{ amount_no_decimals }}
This works party, this removes the last two decimals for all prices, not only prices that end with ".00''. And some prices end with .50 for example so I cant remove the last two decimals for all prices.
@PetervdHoeven - did you try these in this link?
https://help.shopify.com/en/manual/payments/currency-formatting
Hi,
where do I need to place “{{ price | money }}” ?
Yes, so the price looks like 39,- instead of 39.00
1.Go to the Setting.
2.Navigate to the Store details
3.Then Store currency
4.Then click on Close formating
5.${{amount}} change this to ${{amount_no_decimals}}-
Hi, this removes the decimals of all prices, not only the ones that end with “.00”. I have prices that don’t end with .00 that need to stay the same. For example “35,50”.
Still no answer on this question, I guess? I have the same request, so I hope you have found a solution after all. If so, can you share this with us please?
Hey @PetervdHoeven , @jeroenhartman you can use the "remove" filter inside your code where the price tag is used, like this:
{{ product.price | money_with_currency | replace: ",00", ",-" }}
Let me know if this helps, thank you!
Hi @PetervdHoeven & @jeroenhartman ,
In the "dawn" theme, I modified the price.liquid to change this.
{{ money_price }} -> {{ money_price | replace: ',00', ',-'}}
&
{{ compare_at_price }} -> {{ compare_at_price | money | replace: ',00', ',-'}}
Also, you may have to change "money_with_currency" to this code.
Hey,
1. In your Shopify Admin go to online store > themes > actions > edit code and search theme.liquid file.
2. In your theme.liquid file, find the </body> (press CTRL + F on Windows or command + F on Mac)
3. paste this code right above the </body> tag:
<script>
function updatePrice(){
var prices = document.querySelectorAll(`.price-item`);
if (!prices)return;
for (var each of prices){
each.innerText = each.innerText.replace('.00', '');
}
}
window.onload = function() {
setTimeout(updatePrice, 50);
}
</script>
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025