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

#   Error when discounted products

##

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105097](#105097) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105097 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")* was created by *[consultech](/forum/user/13290-consultech "View consultech's Profile")*

error on cart process when some categories are discounted and buyer entering a valid coupon :

administrator/components/com_hikashop/classes/currency.php on line 1717 (invalid argument on each)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MjQzNS1lcnJvci13aGVuLWRpc2NvdW50ZWQtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#105109](#105109) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105109 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi,

We need more information about your configuration and your error.
Which version of HikaShop are you using ?
What's your currency configuration ?
What coupon are you using ? What is his configuration ?

Regards,

---

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

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago -  13 years 5 months ago [\#105285](#105285) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105285 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi

sorry for my late reply and thank you for your support :

Hikashop Business version in production now, only one currency (euro) is in use, other currency are not actived, several coupons code are in use;

one coupon code with pourcentage dreduction limited in time with 1 quota per buyer, for all products, categories and zone and with option to ignore products with discount .
one discount with pourcentage reduction limited too in time but only for one category

thank-you.

- [ ![screenshot.JPG](/forum/attachment/10246) ](/forum/attachment/10246 "screenshot.JPG") [ ](/forum/attachment/10246?download=1 "screenshot.JPG")

Last edit: 13 years 5 months ago by [consultech](/forum/user/13290-consultech "View consultech's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MjQzNS1lcnJvci13aGVuLWRpc2NvdW50ZWQtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#105302](#105302) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105302 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi,

The first thing I see it not the error with the "foreach" but the division by zero line 1711 Code:

$discount-&gt;discount_percent_amount_calculated = $price-&gt;price_value_with_tax*$discount-&gt;discount_percent_amount_calculated_without_tax/$price-&gt;price_value_with_tax;

Which means that your price with tax is zero.

Would it be possible to have a link to your store in order to test it directly (you can send it by private message) or have more screenshots about my previous questions ? (screenshots contains quite more information).

Thanks,

---

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

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105306](#105306) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105306 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

thanks jérome, see MP please.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MjQzNS1lcnJvci13aGVuLWRpc2NvdW50ZWQtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#105333](#105333) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105333 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi,

I tried your discount coupon in your store with the product "Fauteil La Baule" (first product I saw) and the coupon works good.
No error, no warning message, no processing problem.

> Total
> 652,00 €
> Coupon -130,40 €
> Livraison 69,00 €
> TVA 96,79 €
> Total final 590,60 €

Sorry, I can't reproduce you're problem in your store.

Regards,

---

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

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105409](#105409) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105409 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi,

Unfortunately, my client had completed the promotion of one of the categories. I therefore create a special product test so that you can reproduce the error. see mp instructions.

regards,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MjQzNS1lcnJvci13aGVuLWRpc2NvdW50ZWQtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#105436](#105436) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105436 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi,

Thanks, I now see the error message.

Would it be possible to see (screenshot or access) the configuration of the product and the configurations of the discount on this product and the coupon code ?
I want to reproduce your problem in my local website in order to fix it.

Regards,

---

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

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105442](#105442) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105442 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

please see mp

thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MjQzNS1lcnJvci13aGVuLWRpc2NvdW50ZWQtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#105475](#105475) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105475 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi,

We have a recent fix in the discount system but I don't have to right to update HikaShop in your website for checking it.
Can you please update the file "administrator/components/com_hikashop/classes/discount.php" and replace the code: Code:

if ($discountmode == 1) { $coupon2-&gt;total-&gt;prices[0]-&gt;price_value_without_discount_with_tax += ($totalprice_with_tax - $totalnondiscount_with_tax); $coupon2-&gt;total-&gt;prices[0]-&gt;price_value_without_discount += ($totalprice - $totalnondiscount); $coupon2-&gt;total-&gt;prices[0]-&gt;price_value_with_tax += ($totalprice_with_tax - $totalnondiscount_with_tax); $coupon2-&gt;total-&gt;prices[0]-&gt;price_value += ($totalprice - $totalnondiscount); $coupon2-&gt;total-&gt;prices[0]-&gt;price_value_with_tax -= $totaldiscount_with_tax; $coupon2-&gt;total-&gt;prices[0]-&gt;price_value -= $totaldiscount; }

By: Code:

if ($discountmode == 1) { $coupon2-&gt;total-&gt;prices[0]-&gt;price_value_without_discount_with_tax = $totalprice_with_tax; $coupon2-&gt;total-&gt;prices[0]-&gt;price_value_without_discount = $totalprice; $coupon2-&gt;total-&gt;prices[0]-&gt;price_value_with_tax -= $coupon2-&gt;discount_value; $coupon2-&gt;total-&gt;prices[0]-&gt;price_value -= $coupon2-&gt;discount_value_without_tax; }

Best regards,

---

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

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105478](#105478) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105478 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

many thanks for your support.

Sincerly yours,

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105482](#105482) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105482 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

can you check again please code is modified... but still not working

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MjQzNS1lcnJvci13aGVuLWRpc2NvdW50ZWQtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 5 months ago -  13 years 5 months ago [\#105517](#105517) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105517 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Bonsoir,

En effet, le problème est toujours là.
Malheureusement je suis un peu bloqué pour faire des tests ou des correctifs sur votre site.

Edit: Je suis en train de faire des tests en local mais je ne reproduit pas exactement le même comportement.

Cordialement,

---

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

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

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105573](#105573) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105573 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Hi jérome

Ok, thanks a lot... waiting for a fix now...

Best regards,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MjQzNS1lcnJvci13aGVuLWRpc2NvdW50ZWQtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#105582](#105582) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105582 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Bonjour,

Dans le fichier "administrator/components/com_hikashop/classes/currency.php", remplacer: Code:

$discount-&gt;discount_value_without_tax = $discount-&gt;discount_percent_amount_calculated_without_tax = $discount-&gt;discount_percent_amount_calculated = ($price-&gt;price_value*floatval($discount-&gt;discount_percent_amount)/100.0); $discount-&gt;discount_percent_amount_calculated = 0.0; $discount-&gt;discount_percent_amount_calculated = $price-&gt;price_value_with_tax * $discount-&gt;discount_percent_amount_calculated_without_tax / $price-&gt;price_value_with_tax;

Par Code:

$discount-&gt;discount_value_without_tax = $discount-&gt;discount_percent_amount_calculated_without_tax = $discount-&gt;discount_percent_amount_calculated = ($price-&gt;price_value*floatval($discount-&gt;discount_percent_amount)/100.0); $discount-&gt;discount_percent_amount_calculated = 0.0; if($price-&gt;price_value_with_tax != 0.0) $discount-&gt;discount_percent_amount_calculated = $price-&gt;price_value_with_tax * $discount-&gt;discount_percent_amount_calculated_without_tax / $price-&gt;price_value_with_tax;

Dans le fichier "administrator/components/com_hikashop/classes/discount.php", remplacer: Code:

$total-&gt;prices[0]-&gt;price_value_with_tax = $totalnondiscount_with_tax; $total-&gt;prices[0]-&gt;price_value = $totalnondiscount; $currency-&gt;addCoupon($total,$coupon2);

Par Code:

$total-&gt;prices[0]-&gt;price_value_with_tax = $totalnondiscount_with_tax; $total-&gt;prices[0]-&gt;price_value = $totalnondiscount; $total-&gt;prices[0]-&gt;taxes = array(); $currency-&gt;addCoupon($total,$coupon2);

Le problème du calcul du coupon a été corrigé par le précédent patch, ces modifications permettent d'éviter des erreurs de type "warning" mais n'affectant pas le résultat final.

Cordialement,

---

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

The following user(s) said Thank You: [consultech](/forum/user/13290-consultech "View consultech's Profile")

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

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

Less More

- Posts: 54
- Thank you received: 2
-
-

13 years 5 months ago [\#105591](#105591) by [consultech](/forum/user/13290-consultech "View consultech's Profile")  Replied by *[consultech](/forum/user/13290-consultech "View consultech's Profile")* on topic *[Error when discounted products](/forum/3-bug-report/82435-error-when-discounted-products#105591 "error on cart process when some categories are discounted and buyer entering a valid coupon :  administrator/components/com&#95;hikashop/classes/currency.php on line 1717 (invalid argument on each)")*

Perfect... working properly.

Many thanks for your support.

Best regards,

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

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