简体   繁体   中英

Liquid Round Display number as whole if number is 0 after decimal and display same price if there is a number after 0 tried round:1 but didn't work

i want to show a price as a whole number if the number after decimal is 0 but if the price has any specific number after the decimal then it should display the same price

tried round:1 but didn't work

You can just remove ".00" after the price

{{ product.price | money | remove: '.00' }}

If you will haven't ".00" it will just skip it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM