Can't create a coupon code for a single product

  • Posts: 1
  • Thank you received: 0
9 years 6 months ago #201857

-- 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

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 6 months ago #201861

Hi,

Please edit the file "administrator/components/com_hikashop/classes/discount.php" and replace line 222

if (!empty($coupon->discount_product_id)) {
By
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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum