Have your say in Community Polls: What was/is your greatest motivation to start your own business?

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

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

Project_ATLAS
Excursionist
30 0 3

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
345 43 67

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!

Project_ATLAS
Excursionist
30 0 3

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.