Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Storefront Api Cart Currency format

Soumya
Shopify Partner
6 0 0

I'm Using Storefront API to fetch Cart currency details to my headless storefront, and my store currency format is set to INR. But the currency format is coming as a single zero after decimal like "21.0" where I want the currency format to be llike "21.00" two digits after decimal.

Any suggestions how to do that.

 

Replies 2 (2)

andrewjam
Visitor
2 0 0

Im running into the same issue. Have you found a solution?

andrewjam
Visitor
2 0 0

I just ended up using javascripts Intl 

```

Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD'
}).format(Number(10.0))


```