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

#   Wrong total amount using coupon

##

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago [\#186751](#186751) by [Arno](/forum/user/35532-arno "View Arno's Profile")  *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#186751 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")* was created by *[Arno](/forum/user/35532-arno "View Arno's Profile")*

-- HikaShop version -- : 2.3.5

Hi,

I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.

Only in case the setting is "discount after tax" the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.

Hikashop version Starter 2.3.5.

Any idea ?

Regards,
Arno

- [ ![WrongTotalCart1.jpg](/forum/attachment/21718) ](/forum/attachment/21718 "...TotalCart1.jpg") [ ](/forum/attachment/21718?download=1 "...TotalCart1.jpg")
- [ ![WrongTotalCart2.jpg](/forum/attachment/21719) ](/forum/attachment/21719 "...TotalCart2.jpg") [ ](/forum/attachment/21719?download=1 "...TotalCart2.jpg")
- [ ![WrongTotalCart3.jpg](/forum/attachment/21720) ](/forum/attachment/21720 "...TotalCart3.jpg") [ ](/forum/attachment/21720?download=1 "...TotalCart3.jpg")
- [ ![WrongTotalCart4.jpg](/forum/attachment/21721) ](/forum/attachment/21721 "...TotalCart4.jpg") [ ](/forum/attachment/21721?download=1 "...TotalCart4.jpg")
- [ ![WrongTotalCart5.jpg](/forum/attachment/21722) ](/forum/attachment/21722 "...TotalCart5.jpg") [ ](/forum/attachment/21722?download=1 "...TotalCart5.jpg")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#186832](#186832) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#186832 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi,

In the configuration of your coupon, you specify that the coupon has to use a product tax category (Geen).
Can you please remove that association with a tax ?

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago [\#186856](#186856) by [Arno](/forum/user/35532-arno "View Arno's Profile")  Replied by *[Arno](/forum/user/35532-arno "View Arno's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#186856 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi Jerome,

Thanks for your reply. I changed the setting of product tax category.

If setting is ...
geen (=none) --&gt; the total is € 74,82
0% --&gt; the total is € 74,82
6% --&gt; the total is € 74,41
21% --&gt; the total is € 73,41

In all cases the coupon value (€ 6,73) and VAT-6% (€ 2,89) and VAT-21% (€ 4,03) do not change (that is correct; those values are correct). Only the total changes but not to the correct value (should be € 74,21).

Regards,
Arno

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#186937](#186937) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#186937 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi,

Can you please check with the patch in this thread ?
[ www.hikashop.com/forum/taxes/873969-erro...discount.html#186925](http://www.hikashop.com/forum/taxes/873969-error-applying-vat-when-using-general-discount.html#186925)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago [\#187221](#187221) by [Arno](/forum/user/35532-arno "View Arno's Profile")  Replied by *[Arno](/forum/user/35532-arno "View Arno's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#187221 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hello Jerome,

I updated administrator/components/com_hikashop/classes/currency.php with the patch "function getUntaxedPrice" and "function Addcoupon" as mentioned in [ www.hikashop.com/forum/taxes/873969-erro...discount.html#186925](http://www.hikashop.com/forum/taxes/873969-error-applying-vat-when-using-general-discount.html#186925) but it does not effect the total value of the order. Still wrong total.

Regards,
Arno

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#187222](#187222) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#187222 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Okay.

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago [\#187643](#187643) by [Arno](/forum/user/35532-arno "View Arno's Profile")  Replied by *[Arno](/forum/user/35532-arno "View Arno's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#187643 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hello Jerome,

I did some tests and it seems that the wrong total is caused by the VAT over the value of the coupon discount.

See enclosed.

Any idea how to solve ??

Regards,
Arno

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago [\#187644](#187644) by [Arno](/forum/user/35532-arno "View Arno's Profile")  Replied by *[Arno](/forum/user/35532-arno "View Arno's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#187644 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Here is the attachment ....

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NDI3Mi13cm9uZy10b3RhbC1hbW91bnQtdXNpbmctY291cG9uP3RtcGw9bWFya2Rvd24=) 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: 86587
- Thank you received: 14326
-
-

11 years 10 months ago [\#187744](#187744) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#187744 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi,

I think that you should set the "apply discount" option to "after taxes" so that the calculations works like you want.
And if you want to display the coupon value without taxes, it's easy to do.
Just 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);

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago [\#187875](#187875) by [Arno](/forum/user/35532-arno "View Arno's Profile")  Replied by *[Arno](/forum/user/35532-arno "View Arno's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#187875 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi guys,

This is probably the best solution. I set the "apply discount" option to "after taxes" and I edited the file "cart" of the view "checkout".

The total is correct, but the coupon is still **WITH** tax (.. and I have updated the correct template).

Any idea why tax is still included in my coupon value ??

Regards,
Arno

- [ ![Coupon-still-with-tax2.jpg](/forum/attachment/21873) ](/forum/attachment/21873 "...-with-tax2.jpg") [ ](/forum/attachment/21873?download=1 "...-with-tax2.jpg")

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago [\#187876](#187876) by [Arno](/forum/user/35532-arno "View Arno's Profile")  Replied by *[Arno](/forum/user/35532-arno "View Arno's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#187876 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

.. and the other attachment

- [ ![Coupon-still-with-tax1.jpg](/forum/attachment/21874) ](/forum/attachment/21874 "...-with-tax1.jpg") [ ](/forum/attachment/21874?download=1 "...-with-tax1.jpg")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#188227](#188227) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#188227 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi,

Can you please put a Code:

var_dump($this-&gt;coupon);

just after the "echo" line so we will have more details about the coupon content (and the different values of the prices)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 10 months ago -  11 years 9 months ago [\#188269](#188269) by [Arno](/forum/user/35532-arno "View Arno's Profile")  Replied by *[Arno](/forum/user/35532-arno "View Arno's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#188269 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi,

See enclosed file with the data.

Kind regards,
Arno
Code:

object(stdClass)#621 (30) { ["discount_id"]=&gt; string(1) "3" ["discount_type"]=&gt; string(6) "coupon" ["discount_start"]=&gt; string(10) "1421193600" ["discount_end"]=&gt; string(10) "1422748740" ["discount_flat_amount"]=&gt; string(7) "0.00000" ["discount_percent_amount"]=&gt; string(5) "10.00" ["discount_minimum_order"]=&gt; string(7) "0.00000" ["discount_quota"]=&gt; string(1) "0" ["discount_used_times"]=&gt; string(1) "0" ["discount_code"]=&gt; string(13) "NieuweWebShop" ["discount_published"]=&gt; string(1) "1" ["discount_product_id"]=&gt; string(1) "0" ["discount_category_id"]=&gt; string(1) "0" ["discount_zone_id"]=&gt; string(1) "0" ["discount_currency_id"]=&gt; string(1) "1" ["discount_category_childs"]=&gt; string(1) "0" ["discount_auto_load"]=&gt; string(1) "0" ["discount_access"]=&gt; string(3) "all" ["discount_tax_id"]=&gt; string(1) "0" ["discount_minimum_products"]=&gt; string(1) "0" ["discount_quota_per_user"]=&gt; string(1) "0" ["discount_coupon_nodoubling"]=&gt; NULL ["discount_coupon_product_only"]=&gt; NULL ["discount_affiliate"]=&gt; string(1) "0" ["total"]=&gt; object(stdClass)#624 (1) { ["prices"]=&gt; array(1) { [0]=&gt; object(stdClass)#625 (7) { ["price_value"]=&gt; float(59.93223) ["price_value_with_tax"]=&gt; float(66.03993) ["price_currency_id"]=&gt; int(1) ["taxes"]=&gt; array(2) { ["BTW-6%"]=&gt; object(stdClass)#616 (3) { ["tax_namekey"]=&gt; string(6) "BTW-6%" ["tax_rate"]=&gt; string(7) "0.06000" ["tax_amount"]=&gt; float(2.88684) } ["BTW-21%"]=&gt; object(stdClass)#614 (3) { ["tax_namekey"]=&gt; string(7) "BTW-21%" ["tax_rate"]=&gt; string(7) "0.21000" ["tax_amount"]=&gt; float(4.02759) } } ["taxes_without_discount"]=&gt; array(2) { ["BTW-6%"]=&gt; object(stdClass)#626 (3) { ["tax_namekey"]=&gt; string(6) "BTW-6%" ["tax_rate"]=&gt; string(7) "0.06000" ["tax_amount"]=&gt; float(3.2076) } ["BTW-21%"]=&gt; object(stdClass)#627 (3) { ["tax_namekey"]=&gt; string(7) "BTW-21%" ["tax_rate"]=&gt; string(7) "0.21000" ["tax_amount"]=&gt; float(2.9001) } } ["price_value_without_discount_with_tax"]=&gt; float(73.3777) ["price_value_without_discount"]=&gt; float(67.27) } } } ["discount_percent_amount_calculated"]=&gt; float(7.33777) ["discount_percent_amount_calculated_without_tax"]=&gt; float(7.33777) ["discount_value_without_tax"]=&gt; float(7.33777) ["taxes"]=&gt; array(2) { ["BTW-6%"]=&gt; object(stdClass)#628 (3) { ["tax_namekey"]=&gt; string(6) "BTW-6%" ["tax_rate"]=&gt; string(7) "0.06000" ["tax_amount"]=&gt; float(0.32076) } ["BTW-21%"]=&gt; object(stdClass)#629 (3) { ["tax_namekey"]=&gt; string(7) "BTW-21%" ["tax_rate"]=&gt; string(7) "0.21000" ["tax_amount"]=&gt; float(0.29001) } } ["discount_value"]=&gt; float(7.33777) }

Last edit: 11 years 9 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#191627](#191627) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Wrong total amount using coupon](/forum/27-checkout/874272-wrong-total-amount-using-coupon#191627 "-- HikaShop version -- : 2.3.5  Hi,  I have something strange in the checkout when using a coupon of 10% discount. I have changed several settings and checked the forum, but I do not know how this can happen. Checked with several articles, but everytime the same problem: the total is not correct.  Only in case the setting is &quot;discount after tax&quot; the total is correct. But in that case the coupon discount is with tax and that is not correct according the tax law.  Hikashop version Starter 2.3.5.  Any idea ?  Regards, Arno")*

Hi,

Sorry for the late reply.

I edited your message in order to be able to see correctly the var_dump.
We can see in the dump that the value of the "discount_value_without tax" is the same than the "discount_value".

So I think that the fixes for the "addCoupon" function might also fix your issue.
The best will be for the moment to test with the version provided by Nicolas:
[ www.hikashop.com/forum/taxes/873969-erro...html?start=20#187246](http://www.hikashop.com/forum/taxes/873969-error-applying-vat-when-using-general-discount.html?start=20#187246)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NDI3Mi13cm9uZy10b3RhbC1hbW91bnQtdXNpbmctY291cG9uP3RtcGw9bWFya2Rvd24=) 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.084 seconds

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