Samantha57820 Posted June 23, 2013 Share Posted June 23, 2013 I'm using 1.5.3.1 and when I add a product to my cart I get this warning at the very top of the shopping cart page in the FO. Warning: Invalid argument supplied for foreach() in /home/*REMOVED*/public_html/classes/CartRule.php on line 232 I searched the error and only came up with one bug report: http://forge.prestashop.com/browse/PSCFV-8304 . I tried switching out the code he suggested, but it didn't work. I'm not sure what's going on. Here's what my code says... $cartRuleGroups = Db::getInstance()->getValue('SELECT id_group FROM '._DB_PREFIX_.'cart_rule_group WHERE id_cart_rule = '.(int)$cart_rule['id_cart_rule']); foreach ($cartRuleGroups as $cartRuleGroup) if (in_array($cartRuleGroups['id_group'], $customerGroups)) continue 2; Any idea what the error is? The checkout process works. I can add items fine except when Ajax cart is enabled. I'm using LeoPets Theme. My Group Discounts don't work properly. Not sure if that's related- LeoThemes said it was prestashop default not theme related. So I need help. Thanks in advance. Link to comment Share on other sites More sharing options...
Samantha57820 Posted July 10, 2013 Author Share Posted July 10, 2013 Bumping this up. I really need some help here please Link to comment Share on other sites More sharing options...
El Patron Posted July 10, 2013 Share Posted July 10, 2013 does it add to the cart properly? it's a warning and the script will continue.... you can turn off errors if it adds to the cart, i.e. it's working but you are getting the warning message Link to comment Share on other sites More sharing options...
Samantha57820 Posted July 19, 2013 Author Share Posted July 19, 2013 items add properly and you can check out fine but the error pops up whenever you add an item to cart. I turned off error reporting in the meantime. just wondering why the error is there. Link to comment Share on other sites More sharing options...
El Patron Posted July 19, 2013 Share Posted July 19, 2013 items add properly and you can check out fine but the error pops up whenever you add an item to cart. I turned off error reporting in the meantime. just wondering why the error is there. after you turned off error reporting...all is good? Link to comment Share on other sites More sharing options...
Recommended Posts