Hello,
How do I make the price end with ‘’,-‘’ instead of ‘’,00’’
For example: 39,- and not 39,00
Thanks in advance!
A user wants to replace “.00” in product prices with “,-” (e.g., “39,-” instead of “39,00”) while keeping decimal prices like “35,50” unchanged.
Initial Attempts:
{{ amount_no_decimals }} removes all decimals, not just “.00” endingsProposed Solutions:
Several community members suggest using Liquid filters:
Replace filter approach (most recommended):
{{ product.price | money_with_currency | replace: ',00', ',-' }}Theme-specific modification:
price.liquid file{{ money_price }} to {{ money_price | replace: ',00', ',-' }}compare_at_price similarlyKey Point:
The replace filter selectively targets only prices ending in “,00” while preserving other decimal values like “,50”.
The discussion remains open with multiple users seeking the same solution, with the replace filter method appearing most viable.
Hello,
How do I make the price end with ‘’,-‘’ instead of ‘’,00’’
For example: 39,- and not 39,00
Thanks in advance!
@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 }}” ?
sorry, you want to add ‘-’ instead of ‘.00’
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,