Jump to content

Tax on Discounted Final Price, Not Pre-Discount Total (PS 1.6)


skijump

Recommended Posts

I'm looking for help applying tax to the final price of an order, not the pre-discount total. Currently taxes are applied to the "pre-discount total" and added to the final discounted price. Example:

Total Products: $100.00
Total Discounts: $20.00
Pre-Tax Total: $80
Taxes at 10%: $10
Total: $90

The taxes should be $8, not $10. 

I've searched the web numerous times but haven't found a solution yet. Thanks.

Link to comment
Share on other sites

Unfortunately, PrestaShop does not have a standard parameter in the admin panel that allows you to change the order of calculating taxes and discounts.

That is, this logic is hard-coded in internal classes.

Taxes and discounts are calculated in the /classes/Cart.php file.

To change the tax calculation, you need to redefine the Cart.php class and change the logic for calculating the discounted price and tax in the methods:

getOrderTotal()

getTaxesAverageUsed()

getTotalDiscounts()

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...