Version 1.5.6.1
Currently our store shows (for example) a 10% coupon code which is deducted correctly from the goods total; but subsequently after that the VAT is valued from the goods total also, not from the goods total minus the coupon discount, which is what we want. I have changed 'sort order' to many combinations but cannot get the result required. Can anyone help?
Currently our store shows (for example) a 10% coupon code which is deducted correctly from the goods total; but subsequently after that the VAT is valued from the goods total also, not from the goods total minus the coupon discount, which is what we want. I have changed 'sort order' to many combinations but cannot get the result required. Can anyone help?
Big Decision
Website Production, Ecommerce & Digital Marketing in the UK
http://www.bigdecision.co.uk
If I understand you correctly would one of these help?
viewtopic.php?t=67809
https://www.opencart.com/index.php?rout ... upon%20vat
https://www.opencart.com/index.php?rout ... load_id=33
viewtopic.php?t=67809
https://www.opencart.com/index.php?rout ... upon%20vat
https://www.opencart.com/index.php?rout ... load_id=33
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk
Just for reference, Super Coupons can do this, since it bases its calculation on the sub-total without tax by default. However, I think there's an easy edit to get the built-in coupon system to do this, since you just have to skip it applying discounts to tax. Try this edit and see if it works:
Code: Select all
IN:
/catalog/model/total/coupon.php
REPLACE:
if ($product['tax_class_id']) {
WITH:
if (false) {
Thanks for the reply.
My problem is slightly different. The coupon amount is correct but the VAT is calculated on the total before the coupon, so the total is incorrect - see attachment.
My problem is slightly different. The coupon amount is correct but the VAT is calculated on the total before the coupon, so the total is incorrect - see attachment.
Attachments
Screenshot 2019-05-20 at 10.32.13.png (17.56 KiB) Viewed 1671 times
Big Decision
Website Production, Ecommerce & Digital Marketing in the UK
http://www.bigdecision.co.uk
Thank you for the suggestion. No this did not fix it. In fact investigating this further the coupon does not get deducted at all until it gets taken off the grand total, irrespective of what order the 'order totals' are in.Johnathan wrote: ↑Sat May 18, 2019 9:42 pmJust for reference, Super Coupons can do this, since it bases its calculation on the sub-total without tax by default. However, I think there's an easy edit to get the built-in coupon system to do this, since you just have to skip it applying discounts to tax. Try this edit and see if it works:
Code: Select all
IN: /catalog/model/total/coupon.php REPLACE: if ($product['tax_class_id']) { WITH: if (false) {
Big Decision
Website Production, Ecommerce & Digital Marketing in the UK
http://www.bigdecision.co.uk
Coupons should affect the tax if the products in the cart have Tax Classes on them. The edit I gave you would reverse that, but if the default behavior isn't working, then something's wrong in your installation. The order of the line items does not matter in this case --- the Coupon line item is coded to look at the discount, and deduct it's portion from the taxes.
I'm not sure why it's not working for you. You could use Super Coupons which is its own system, and would work fine with Taxes and how it calculates its discount. If you don't want to get an extension, hopefully someone will post here with some ideas for why it's not working.
I'm not sure why it's not working for you. You could use Super Coupons which is its own system, and would work fine with Taxes and how it calculates its discount. If you don't want to get an extension, hopefully someone will post here with some ideas for why it's not working.
Who is online
Users browsing this forum: No registered users and 194 guests