This pull request implements some improvements around how tax is displayed, especially when tax isn't included as part of product prices.
Improvements
Add {{ sc:cart:shippingTotalWithTax }} tag
A new shippingTotalWithTax method has been added to the {{ sc:cart }} tag. This allows you to get the shipping total, inclusive of tax.
{{ sc:cart:shippingTotalWithTax }}
Fix {{ sc:cart:itemsTotalWithTax }} tag
This PR fixed an issue I spotted with the itemsTotalWithTax method on the {{ sc:cart }} tag. When this tag was used in conjunction with shipping tax, the returned calculations would be incorrect.
Now, the total inclusive of tax will just run through the tax totals for each of the line items rather than relying on the tax_total field.
Line Items: Added totalIncludingTax method
A new method has been added to the LineItem class, allowing you to get the line item total including any taxes relating to that line item.
Totals in email should all include tax, if tax is included in prices
When the included_in_prices setting is true in the tax engine config, totals in Simple Commerce's built-in order emails will be displayed inclusive of tax.
The 'Tax Total' row has been removed from the order summary table in these cases.
To Do
[x] Add shippingTotalWithTax tag
[x] Fix the itemsTotalWithTax tag
[x] Line Items: totalIncludingTax method
[x] Totals in email should all include tax, if tax is included in prices
This pull request implements some improvements around how tax is displayed, especially when tax isn't included as part of product prices.
Improvements
Add
{{ sc:cart:shippingTotalWithTax }}
tagA new
shippingTotalWithTax
method has been added to the{{ sc:cart }}
tag. This allows you to get the shipping total, inclusive of tax.Fix
{{ sc:cart:itemsTotalWithTax }}
tagThis PR fixed an issue I spotted with the
itemsTotalWithTax
method on the{{ sc:cart }}
tag. When this tag was used in conjunction with shipping tax, the returned calculations would be incorrect.Now, the total inclusive of tax will just run through the tax totals for each of the line items rather than relying on the
tax_total
field.Line Items: Added
totalIncludingTax
methodA new method has been added to the
LineItem
class, allowing you to get the line item total including any taxes relating to that line item.Totals in email should all include tax, if tax is included in prices
When the
included_in_prices
setting istrue
in the tax engine config, totals in Simple Commerce's built-in order emails will be displayed inclusive of tax.The 'Tax Total' row has been removed from the order summary table in these cases.
To Do
shippingTotalWithTax
tagitemsTotalWithTax
tagtotalIncludingTax
method