Discount off total before tax calculation

  • Posts: 23
  • Thank you received: 0
12 years 1 week ago #49890

Hi Nicolas:

I see this issue has been beat to death on the forum but I still don't see a satisfactory answer.

If a discount can be offered and calculated and tax calculated on the price less discount is there not a way to do the same thing with a coupon?

This is what I need:

Invoice 325.00
coupon -25.00
Invoice total 300.00


12% tax on 300 36.00
TOTAL INVOICE 336.00

It seems many people are having this problem. I want to do a discount but I need to track where people are seeing my marketing hence the coupon code needed to entice people to enter the coupon and I then can see where they are seeing my adverts. I have tried adding the tax category in the coupon config. This gives the correct tax amount in the cart but shows a 28.00 dollar coupon instead of 25.00 so cart look like this:


Total 325.00 figure is correct
coupon -28.00 figure is wrong (should be 25.00)
tax 36.00 figure is correct
Final Total 336.00 This is the correct total of what it should be but does not add correctly to the figures above


Now the invoice in the back end in the order looks like this:

Sub total CAD325.00 figure is right
VAT CAD39.00 figure is wrong (should be 36.00)
Coupon CAD-28.00 figure is wrong (should be 25.00)
Total CAD336.00 figure is correct total


Is there anyway to straighten this out so both show

subtotal 325.00
coupon -25.00
tax 12% 36.00
TOTAL 336.00

After all that whinning I would like to say that hika shop is a really great product. I had tried to use it once before but the canadian address system really screwed up the shipping. In this web site there is no shipping so I'm hoping the canadian taxes don't screw things up thistime.

Have a Great Day and I look forward to hearing from you!
Brad Benson

Please Log in or Create an account to join the conversation.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 1 week ago #49994

Edit the file 'cart' of the view 'checkout' via the menu Display->Views and change the line:
echo $this->currencyHelper->format(@$this->coupon->discount_value*-1,@$this->coupon->discount_currency_id);

to:
echo $this->currencyHelper->format(@$this->coupon->discount_value_without_tax*-1,@$this->coupon->discount_currency_id);

That should hopefully display what you want.

Note that it's not as simple as just changing that by default in HikaShop since based on your country, coupons will be applied differently to prices. Before or after taxes, and you might want to calculate the percentage value based on the value before or after taxes if the coupon is applied after taxes.

The following user(s) said Thank You: dilum_tharaka

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum