Skip to main content

Can't create a coupon code for a single product

More
11 years 4 months ago #201857 by lhjweb
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Safari 7.1.6
-- Error-message(debug-mod must be tuned on) -- : Warning: explode() expects parameter 2 to be string, array given in /home/www/biologiforbundet.dk/administrator/components/com_hikashop/classes/discount.php on line 223

Hello Hika Shop
I bought Hika Shop on May 12, 2015 , but I have trouble creating a coupon code for a single product. I get this error: This coupon can not be used for the products in the basket , and finally I get this error message:
Warning: explode() expects parameter 2 to be string, array given in /home/www/biologiforbundet.dk/administrator/components/com_hikashop/classes/discount.php on line 223

The coupon Code is 3Ep7 and the product is ( www.biologiforbundet.dk/index.php/salg/h...historien-i-blomsten )
Can you please help me
Best regards
Lars
PS. Cupon code works fine if I put it into a category / and i have already tried to update Hika Shop

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

More
11 years 4 months ago #201861 by Jerome
Hi,

Please edit the file "administrator/components/com_hikashop/classes/discount.php" and replace line 222
Code:
if (!empty($coupon->discount_product_id)) {
By
Code:
if (!empty($coupon->discount_product_id) && is_string($coupon->discount_product_id)) {
It will fix the warning and should improve the discount on the product.
But I see in your configuration that you have also a category selected but without a name ; please be sure that this category is removed from the discount configuration ; it might also affect the coupon processing.

Regards,

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

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

Time to create page: 0.173 seconds
Powered by Kunena Forum