Help with subtotal calculation

3 0 0

I am looking for some help in getting my Cart Subtotal to display correctly when there are non-taxable items (gift cards) in the cart

Currently the Cart Subtotal is shown with the following simple code:

{{ cart.total_price | times:1.1 | money }}

This works for most cases, but obviously shows an incorrect value when there are gift cards in the cart

Does anybody have any ideas on how I can code the subtotal to calculate the sum of all taxable cart lines, times it by the tax rate, add the sum of all non-taxable cart lines and display the result?

I.e. Subtotal = (total of all taxable lines x 1.1) + (total of all non-taxable lines)

Replies 0 (0)