How do I implement this code '{{ product.price | money_without_trailing_zeros }}'

Project_ATLAS
New Member
26 0 0

I am trying to emulate the following appearance from another Shopify store (the global brand Hismile).

A support advisor pointed me in the direction of this code segment from the Shopify .dev docs, but I have no idea how exactly to implement this.

I would also like to add the string 'was' before compare-at-prices storewide, so 'was $75', or 'was $75.50'.

You can see all of this in the image example from hismileteeth.com below.

Prices.png

 

As you can see, for the compare-at-price it also removes the 'AU', unlike in my current set up which you can view below.


Project_ATLAS_0-1699266260934.png



Thank you in advance for any help.

Replies 2 (2)
fadi_yousif
Shopify Partner
315 40 54

I don't have access to your theme code but this is usually implemented in sections --> main-product.liquid

Freelance Shopify Developer | Helping Shopify merchants grow with high-converting online stores!
 - Did I help? Leave a tip!
 - Need my help? Chat on Telegram or WhatsApp
 - Was your question answered? Mark it as an Accepted Solution

Project_ATLAS
New Member
26 0 0

I tried to do this but it didn't work. Do I need to modify this code in some way, it doesn't look to be in a format I've ever seen.