All things Shopify and commerce
Hi,
The product prices are listed without including the Tax (GST). For instance, I have a product priced at $363.64 before GST.
If a customer buys two of these items, the subtotal will appear as:
$363.64 x 2 = $727.28
To include the GST, we multiply this subtotal by 1.1:
$727.28 x 1.1 = $800.008
Then, we round it to show 2 decimals $800.01, which is what the customer sees on the checkout page. However, even though this calculation is correct mathematically, I'd prefer to eliminate the third decimal place and round it to show $800.00.
I've tested with various combinations of the code below, but haven't had success:
{{ item.line_price | round:2 | times: 1.1 | money }}
or
{{ item.line_price | times: 1.1 | round:2 | money }}
Any help would be much appreciated.
Hi,
Thanks for the reply. Unfortunately, it didn't work for me.
I removed the parameters one by one to see what is the result of each of them.
I put the result from each part of the liquid code in front of it.
{{ item.line_price | times: 1.1 | money | remove: "," | round | money }} -> $0.00
{{ item.line_price | times: 1.1 | money | remove: "," | round }} -> 0
{{ item.line_price | times: 1.1 | money | remove: "," }} ->$800.01
{{ item.line_price | times: 1.1 | money }} -> $800.01
{{ item.line_price | times: 1.1 }} ->80000.8
Thanks again,
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025