jimpottle Posted October 10, 2006 Share Posted October 10, 2006 Have a site that appears to work well under v5.1.6 (my personal test server) but gets caught up in some form of a loop under v4.4.1 (the ISP server). Not sure what is happening but for some reason I believe it is to do with resetting the session variables used with the shopping basket. Current code (a bit dirty but there it is) is as follows:[pre]if ($_SESSION['cart']) { for (reset ($_SESSION['cart']); $key = key ($_SESSION['cart']); next ($_SESSION['cart'])) { if ($product == $_SESSION['cart'][$key][product]) { $_SESSION['cart'][$key][qty] = $_SESSION['cart'][$key][qty] + $qty; $new_qty = 1; } }}[/pre]Any further information can be provided so long as I can understand what is being asked for ;-) 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.