Remove comma from the price over 1000

Olga_Levicheva
New Member
3 0 0

Please help!

My shop has RUB currency. I need to remove comma from the prices over 1000 rub because it looks critically incorrect in Russian, e.g. 1,200 rub for someone Russian means 1,2 rub not 1200.

I have "amount_no_decimals" in the currency settings and use { ...| money | remove: ',' } filter everywhere in html, but it only affects prices on the collections pages but not on the product page and not in the cart.

How can I remove the comma?

0 Likes
Caroline_Schnap
Shopify Staff
Shopify Staff
5711 1 343

Hi Olga!

I work at Shopify and have implemented a quick fix to your shop just now. I have edited lines 257 and 259 in your theme.liquid file. Have a look there, and you'll understand what I did. Your product pages will be fine now.

I also edited your cart.liquid template to fix amounts on the cart page — using the same Liquid filter you used elsewhere.

I noticed that all links in your main menu list the same drop-downs. Intentional?

0 Likes
Olga_Levicheva
New Member
3 0 0

Thank you so much!!!

yes, links are the same at the moment, I'm using them just as samples, haven't really filled the products section yet.

 

0 Likes
Niklas_Niklasso
New Member
3 0 0

Hi Caroline, (or anyone who might know the answer)

We're just launching our store and love Shopify so far!

I'm also interested in removing the comma in my prices over 1000. 1,200 in SEK is the same as 1,2 SEK, therefore this is quite important to us! Could you please give an instruction on how to change this?

Regards,
Seif

0 Likes
Yaroslav_Zhoock
New Member
1 0 1

Нужно найти все вхождения вывода сумм. Если у меня сумма выводится как 15,000 руб, а запятая мне эта в хуй не впёрлась, то делаем следующее: находим, например, хрень типа {{ cart.total_price | money }} и меняем её на {{ cart.total_price | money  | replace:',',' ' }} и получаем 15 000 руб. Как вариант...

maheshwari_b
Shopify Partner
5 0 1

Can you explain me on how to do this for product page?

 

maheshwari_b
Shopify Partner
5 0 1

It was a simple solution after doing some research I finally found a solution. To add custom symbol to the price and removing the decimal can be done in the settings.

Steps to edit the price without any decimals

setting -> General -> Currency Format

{{amount_no_decimals}}

If you want to add the "" symbol in front of the price you can add the symbol or equivalent HTML code

₹ {{amount_no_decimals}} or ₹ {{amount_no_decimals}}

But removing the commas was not possible in this as product price is generated from Javascript. Sometimes removing commas might be confusing for some customers. So just removed the decimals and added the "" symbol. 

 

 

0 Likes
Zvina
New Member
1 0 0

Hi Guys

I would also like to remove the comma sign on my store - how can I do this please?

Want to go from R 1,050 to R 1050

Warm Regards

Zvina

0 Likes