Performing maths on my price - no decimal places?

Danielnz
Excursionist
29 0 10

I'm trying to display my prices in laybuy amounts. So a product costing $139 would be 6 payments of $23.17.

 

My 'price' value is 13900, so I display the following:

 

{{ price | divided_by: 6 | divided_by: 100 }}

This displays as 23 instead of 23.17

 

I've tried adding 2 points for decimal rounding, but this still just displays as 23.

 

{{ price | divided_by: 6 | divided_by: 100 | round: 2 }}
Replies 5 (5)
oscprofessional
Shopify Partner
11006 1755 2232

Hello 
You are working on which theme?
Please refer below url this may help you:
https://community.shopify.com/c/Shopify-Design/Consistent-Format-of-Prices-2-Decimal-Places/m-p/2379...

Please Like and Accept Solution. Free website audit to grow your business Chat on WhatsApp | Email: pallavi@oscprofessionals.com | Skype : oscprofessionals-87 | Hire us | Expert Site Speed Optimization | Performance Site Audit | Shopify Private App | Custom Theme Development & Modifications any Shopify Theme | Shopify SEO | Digital Marketing
ashiqueh4
Shopify Partner
361 34 56

we have to use like this 

 

{{ 183.357 | round: 2 }}

Shopify ,Shopify plus and Shopify 2.0 theme developer and customization

I Would like to add new functionality or customize an existing one, please hire me.
If helpful then please Like and Accept Solution .
Email: ashiquehussaincodediary@gmail.com

Danielnz
Excursionist
29 0 10

I believe the theme is called "Debut".

Danielnz
Excursionist
29 0 10

This is fine, but I don't know my number because I need to do the math first.

ashiqueh4
Shopify Partner
361 34 56

you can use java script to do it  

Shopify ,Shopify plus and Shopify 2.0 theme developer and customization

I Would like to add new functionality or customize an existing one, please hire me.
If helpful then please Like and Accept Solution .
Email: ashiquehussaincodediary@gmail.com