liquid math operators not working for price

Tourist
4 0 1

product.price = 15.95 

 

Input:

 

{{ product.price | floor | divided_by: 20.0 | money}}

 

Output:

 

0.80

 

The output I want:

 

0.75

0 Likes

Hello 

Replace your code with below code

{{ product.price | divided_by: 20.0 | money}}
Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
Tourist
4 0 1

Thanks but not working.

 

{{ product.price | divided_by: 20.0 | money}}

output 0.80 and desired output is 0.75 

0 Likes
Tourist
4 0 1

If somebody is also looking solution for this someday.. rounding works with integral_money_with_currency:

 

{{ product.price | divided_by: 100.0 | floor | integral_money_with_currency }}

 

1 Like