Re: Removing currency code and decimal - Dawn

Removing currency code and decimal - Dawn

Element1
Excursionist
50 0 9

hi! could anyone help me, i'm trying to remove the currency code and remove the decimals that show on the product page in the add to cart button?

 

i've successfully done it for the default store currency, but for any other currency, it still shows the currency code and the decimals (although, for the collection pages, it has removed the currency code but hasn't removed the decimal)

 

https://cnglzcgq3aqwn9vj-27884224571.shopifypreview.com

 

Screenshot 2024-11-04 223726.png

Replies 9 (9)

comercioservice
Shopify Partner
283 38 34

@Element1 you need to change some liquid code on your theme

1st go to this buy-button file 

comercioservice_0-1730760228879.png

2nd find this part of code on this file

comercioservice_1-1730760275064.png


I hope it works for you, let me know, and If you'd like to discuss this more, don't hesitate to send me a PM
Thank you

 

Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!
Element1
Excursionist
50 0 9

found it! it currently looks like this for me

Screenshot 2024-11-04 230206.png

Dan-From-Ryviu
Shopify Partner
10766 2128 2248

Hi @Element1 

Please try to edit this code from 'money_with_currency' to 'money_without_currencyScreenshot 2024-11-05 at 08.28.13.png

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Element1
Excursionist
50 0 9

hi! this removed the currency code and the currency symbol, I want to keep the currency symbol, so I used "money_without_trailing" instead which worked

Dan-From-Ryviu
Shopify Partner
10766 2128 2248

Did you change currency settings in your store admin > Settings, change Currency formatting?Screenshot 2024-11-05 at 09.00.54.png

Screenshot 2024-11-05 at 09.01.15.png

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Element1
Excursionist
50 0 9

hi! the store currency has already been changed and is working perfectly. it's the other currencies that still show the trailing zeros and I want to remove 

Dan-From-Ryviu
Shopify Partner
10766 2128 2248

Also, change it to this and check again 

{{ product.price | money_without_trailing_zeros }}

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Javisll1
Visitor
1 0 0

Screenshot 2024-11-05 at 09.00.54.png

And again Code errors are found in your store check it out

cnglz.png

Element1
Excursionist
50 0 9

i've already changed the store currency, and that's working as it should. i need help with the other currencies as they still show the trailing zeros unlike the store currency