skijump Posted yesterday at 01:36 PM Share Posted yesterday at 01:36 PM 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 More sharing options...
alex_developer Posted 20 hours ago Share Posted 20 hours ago 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now