All things Shopify and commerce
We got an issue that the price returns from cart.json api, it is multipled for 100 in random store.
Is there any option configured it on Shopify admin?
Hi @torus-peter ,
Shopify always returns the price in cents, that is why it shows in multiples of 100, this behaviour can be noticed in liquid too.
For example,
if the price of a product is $100, and in liquid if you write {{ product.price }}, it will show as 10000, that is why we use a 'money' filter in liquid ({{ product.price | money }}), this will show the price with the currency and also show the price in dollar value.
For javascript you have replicate something like that as there are no functions available for this in shopify frontend, you have to divide the price by 100 for your calculation.
Hello @Atanu_Sarkar , As you see in my 2 images, there are some stores where the price doesn't multiply by 100. That is my concern.
Did you find any solutions for this? I find dividing by 100 is not reliable.
No yet, I checked case by case from my side. Actually, this case rarely happens
So have you found other stores with the same currency but that don't have prices multiplied by 100? I was hoping it could be because of the currency.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024