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

#   Error line 242 in discount.php

##

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

13 years 8 months ago [\#93806](#93806) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  *[Error line 242 in discount.php](/forum/3-bug-report/79153-error-line-242-in-discount-php#93806 "Hi there,  Using Hikashop 2.1.0, under Joomla 2.5.9 - when I setup an auto-coupon with these parameters:  Code : BUYING3 Type: Coupon Published: Yes Minimum order value: $ 45.00 Minimum number of products: 3 Auto load in cart if possible: Yes  &#91; for $ 3 off if a customer buys 3 products &#91;all products have the same price&#93;, &#93;  On the front end, I get: Warning: Invalid argument supplied for foreach() in /home/cridge/public&#95;html/administrator/components/com&#95;hikashop/classes/discount.php on line 242  I have since then turned off this discount &#91;I had also one for buying 6 and 12&#93; when I realized that the auto-loading of coupons on works at the product level and NOT at the item level and therefore won't work for me. BUT I figured I'd still mention it!  Cheers,  Emmanuel.")* was created by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")*

Hi there,

Using Hikashop 2.1.0, under Joomla 2.5.9 - when I setup an auto-coupon with these parameters:

Code : BUYING3
Type: Coupon
Published: Yes
Minimum order value: $ 45.00
Minimum number of products: 3
Auto load in cart if possible: Yes

[ for $ 3 off if a customer buys 3 products [all products have the same price], ]

On the front end, I get:
Warning: Invalid argument supplied for foreach() in /home/cridge/public_html/administrator/components/com_hikashop/classes/discount.php on line 242

I have since then turned off this discount [I had also one for buying 6 and 12] when I realized that the auto-loading of coupons on works at the product level
and NOT at the item level and therefore won't work for me. BUT I figured I'd still mention it!

Cheers,

Emmanuel.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83OTE1My1lcnJvci1saW5lLTI0Mi1pbi1kaXNjb3VudC1waHA/dG1wbD1tYXJrZG93bg==) 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: 86564
- Thank you received: 14311
-
-

13 years 8 months ago [\#93807](#93807) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error line 242 in discount.php](/forum/3-bug-report/79153-error-line-242-in-discount-php#93807 "Hi there,  Using Hikashop 2.1.0, under Joomla 2.5.9 - when I setup an auto-coupon with these parameters:  Code : BUYING3 Type: Coupon Published: Yes Minimum order value: $ 45.00 Minimum number of products: 3 Auto load in cart if possible: Yes  &#91; for $ 3 off if a customer buys 3 products &#91;all products have the same price&#93;, &#93;  On the front end, I get: Warning: Invalid argument supplied for foreach() in /home/cridge/public&#95;html/administrator/components/com&#95;hikashop/classes/discount.php on line 242  I have since then turned off this discount &#91;I had also one for buying 6 and 12&#93; when I realized that the auto-loading of coupons on works at the product level and NOT at the item level and therefore won't work for me. BUT I figured I'd still mention it!  Cheers,  Emmanuel.")*

Thank you for the feedback, we'll fix that for next version.

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

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