Guest 7Design Posted January 22, 2006 Share Posted January 22, 2006 When I add an item to the cart, I get the following error: "Warning: Invalid argument supplied for foreach() in /home/public_html/store1/includes/content/cart.inc.php on line 346" Any help on this? I'm going insane. I have to install 2 of these carts, and I can't even get one going completely. 7Design Quote Link to comment Share on other sites More sharing options...
Guest sunshine Posted January 22, 2006 Share Posted January 22, 2006 Look in the includes folder->content->cart.inc. on line 346, does the line look precisely like this? foreach($basket['conts'] as $key => $value){ Quote Link to comment Share on other sites More sharing options...
Guest 7Design Posted January 22, 2006 Share Posted January 22, 2006 Look in the includes folder->content->cart.inc. on line 346, does the line look precisely like this? foreach($basket['conts'] as $key => $value){ Yes. Exactly. But, since I did have the cart working before, I believe when uploading all files this time around, my ftp client must have caused a problem. I can't think of any other issue that would cause this. 7Design Quote Link to comment Share on other sites More sharing options...
garywhitling Posted June 26, 2006 Share Posted June 26, 2006 Hi I have the same problem today when I moved host. Anyone have an idea why this is happening? Look in the includes folder->content->cart.inc. on line 346, does the line look precisely like this? foreach($basket['conts'] as $key => $value){ Yes. Exactly. But, since I did have the cart working before, I believe when uploading all files this time around, my ftp client must have caused a problem. I can't think of any other issue that would cause this. 7Design Quote Link to comment Share on other sites More sharing options...
Chargin Posted July 30, 2006 Share Posted July 30, 2006 Im just replying to all the threads on this, Ive just encountered the same problem..... Quote Link to comment Share on other sites More sharing options...
Guest PMinteractive Posted August 16, 2006 Share Posted August 16, 2006 I just started having this error and really couldn't figure it out at first, it didn't make sense. You usually get this error when you pass a 'foreach' statement something other than the array it was expecting to cycle through, and is a sign of something failing to populate an array further up the code. I also couldn't add stuff to the cart and I know this is tracked by cookies. I had recently upgraded to Opera 9 (talk about a step backwards...) and its been a bit odd with cookies and the like. So anyway, I found that deleting all cookies for the site (and clearing the cache for good measure) fixed all the problems I was having by magic. Try it in a browser you haven't used before, or on someone elses computer to see if the problem still exists. Good luck guys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.