Jump to content

HELP! Getting Warning when adding Item to Cart


Recommended Posts

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

  • 3 weeks later...
  • 2 weeks later...

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

×
×
  • Create New...