[Skip to main content](#vessel-content)

#   Discount off total before tax calculation

##

- **[benweb](/forum/user/3450-benweb "View benweb's Profile")**
- [![benweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3450-benweb "View benweb's Profile") Topic Author
- [ Offline](/forum/user/3450-benweb)

Less More

- Posts: 23
- Thank you received: 0
-
-

14 years 6 months ago [\#49890](#49890) by [benweb](/forum/user/3450-benweb "View benweb's Profile")  *[Discount off total before tax calculation](/forum/4-how-to/49890-discount-off-total-before-tax-calculation#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")* was created by *[benweb](/forum/user/3450-benweb "View benweb's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ5ODkwLWRpc2NvdW50LW9mZi10b3RhbC1iZWZvcmUtdGF4LWNhbGN1bGF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

14 years 6 months ago [\#49994](#49994) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Discount off total before tax calculation](/forum/4-how-to/49890-discount-off-total-before-tax-calculation#49994 "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")*

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

to:
echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;coupon-&gt;discount_value_without_tax*-1,@$this-&gt;coupon-&gt;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](/forum/user/37297-dilum-tharaka "View dilum&#95;tharaka's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ5ODkwLWRpc2NvdW50LW9mZi10b3RhbC1iZWZvcmUtdGF4LWNhbGN1bGF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.040 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
