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

30 0 2

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



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.


Thank you in advance for any help.

Replies 2 (2)

Shopify Partner
344 43 66

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

Freelance Shopify Developer

Did I help? Leave a tip!

30 0 2

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.