Global price format without thousand separator

Solved
lukas-irsak
Visitor
2 0 0

Hi,

How to achieve following format for whole eshop?

Format:
€ 1 650

I found this working but i don't want to format price everywhere:

price | money_without_trailing_zeros | replace: ".", " "

And also i found this https://shopify.dev/docs/themes/liquid/reference/filters/money-filters but it don't seem to cover my use case as well.

Is there any possibility to format price globally with format above?

Accepted Solution (1)
Dirk
Shopify Staff
Shopify Staff
2081 234 476

This is an accepted solution.

Hey, @lukas-irsak 

There's actually a dedicated area in your Shopify settings where you can change the global formatting of your store's currency. I've taken a screenshot below to show you how this can be accomplished in your Settings > General page:

 

I hope this helps! If there is anything else I can help you with, please let me know.

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 9 (9)
Dirk
Shopify Staff
Shopify Staff
2081 234 476

This is an accepted solution.

Hey, @lukas-irsak 

There's actually a dedicated area in your Shopify settings where you can change the global formatting of your store's currency. I've taken a screenshot below to show you how this can be accomplished in your Settings > General page:

 

I hope this helps! If there is anything else I can help you with, please let me know.

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

lukas-irsak
Visitor
2 0 0

Awesome, thank you 🙂

LeonL
Tourist
6 0 16

Thank you for the great tip @Dirk ! Is there also a way to remove the space? By that I mean no separators at all. I would love to have $2500 instead of $2 500 / $2,500. Thank you!

Dirk
Shopify Staff
Shopify Staff
2081 234 476

Hey, @LeonL 

For this, I would suggest checking out an older forum topic where this was brought up here. There are some snippets of code provided that may prove to be useful!

Note: Be sure to duplicate your theme before editing theme files. In case something breaks, you have a working theme file still.

If there is anything else I can help you with, please let me know

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

LeonL
Tourist
6 0 16

Dear @Dirk Thank you for taking your time in replying! Yes, I noticed this post before, but it's from year 2013 and I guess the code has been changed. Would you have any idea where to look for the snippet files, what @Caroline_Schnap suggested at the end of your mentioned forum topic?

I am using Debut theme and cannot find the place where to replace the

 | money 

with:

 | money | remove: ','

Thank you!

Dirk
Shopify Staff
Shopify Staff
2081 234 476

Hey, @LeonL 

Editing the 'product-price' snippet will remove the , in your pricing on each product page:

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

LeonL
Tourist
6 0 16

Thanks a lot @Dirk I particullary value the fact that you are taking your time to reply in even Solved threads! Your solution worked like a charm! I just want to add to those who are also searching for this - one must also edit product-price-listing.liquid the same way, so the comma is also removed on all listings and collection pages, not just an opened product page.

Thank you once again! More people like you and the world will be a better place one day.

Dirk
Shopify Staff
Shopify Staff
2081 234 476

Happy to help @LeonL! Glad it worked out for you in the end. 

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

LeonL
Tourist
6 0 16

To anyone fighting this in 2023, some settings in Shopify has been changed and the solution that worked in Debut theme for my new shop goes for me as this:

 

1. Settings > General > Store currency > Change formatting:
s.png

2. Then Edit theme code. Modify the line in both product-price.liquid and product-price-listing.liquid to this:
 assign money_price = price | money | remove: '.'

In my case, it was around lines 23, 24, but could differ. Screenshot from my new code that worked below:


ss.png