FROM CACHE - en_header

How do I replace product price ".00" with ",-"

PetervdHoeven
Excursionist
17 1 2
 
Hello,
 
How do I make the price end with '',-'' instead of '',00''
 
For example: 39,- and not 39,00
 
Thanks in advance!
Replies 11 (11)
suyash1
Shopify Partner
6095 713 1006

@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.

You are welcome to contact me - suyash.patankar@gmail.com, My timezone is GMT+5:30,to build shopify pages use pagefly | want to support?
PetervdHoeven
Excursionist
17 1 2

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? 

 

suyash1
Shopify Partner
6095 713 1006

@PetervdHoeven - can you put like this in your price format and check ? {{ amount_no_decimals }},

 

so add "," after {{ amount_no_decimals }}

You are welcome to contact me - suyash.patankar@gmail.com, My timezone is GMT+5:30,to build shopify pages use pagefly | want to support?
PetervdHoeven
Excursionist
17 1 2

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. 

suyash1
Shopify Partner
6095 713 1006

@PetervdHoeven - did you try these in this link?

 

https://help.shopify.com/en/manual/payments/currency-formatting

You are welcome to contact me - suyash.patankar@gmail.com, My timezone is GMT+5:30,to build shopify pages use pagefly | want to support?
Zworthkey
Shopify Partner
5581 642 1512

@PetervdHoeven 
hi,
you can try this :

{{ price | money }}

for the Decimal points in price.

PetervdHoeven
Excursionist
17 1 2

Hi,

where do I need to place “{{ price | money }}” ?

Zworthkey
Shopify Partner
5581 642 1512

@PetervdHoeven 

sorry, you want to add '-' instead of '.00'

PetervdHoeven
Excursionist
17 1 2

Yes, so the price looks like 39,- instead of 39.00 

Zworthkey
Shopify Partner
5581 642 1512

614bc3501c0df8a0df0fb518_shopify-change-currency-format-min.png

@PetervdHoeven 

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}}-

PetervdHoeven
Excursionist
17 1 2

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”.