davec1031 Posted September 28, 2007 Posted September 28, 2007 I get this error after adding something to the cart when doing a test purchase: Warning: Division by zero in /homepages/17/d144609194/htdocs/valkyriesreign/includes/application_top.php on line 477 Warning: Cannot modify header information - headers already sent by (output started at /homepages/17/d144609194/htdocs/valkyriesreign/includes/application_top.php:477) in /homepages/17/d144609194/htdocs/valkyriesreign/includes/functions/general.php on line 33 If anyone knows how i can fix this, please let me know.. it's the only thing keeping me from starting the site up.. Thanks in advance
Nullachtfuffzehn Posted September 28, 2007 Posted September 28, 2007 please post the code so we can have a look what's in line 477 at your application_top.php. Otherwise we can only guess.
davec1031 Posted September 28, 2007 Author Posted September 28, 2007 For some reason, i couldn't edit it again.. but here is the info From Aplication_top.php: Text with arrow is the line 477 // customer wants to update the product quantity in their shopping cart case 'update_product' : for ($i=0; $i<sizeof($HTTP_POST_VARS['products_id']);$i++) { if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) { $cart->remove($HTTP_POST_VARS['products_id'][$i]); <------- Line 477 } else { if (PHP_VERSION < 4) { // if PHP3, make correction for lack of multidimensional array. reset($HTTP_POST_VARS); while (list($key, $value) = each($HTTP_POST_VARS)) { if (is_array($value)) { while (list($key2, $value2) = each($value)) { if (ereg ("(.*)\]\[(.*)", $key2, $var)) { $id2[$var[1]][$var[2]] = $value2; } } } }
davec1031 Posted September 29, 2007 Author Posted September 29, 2007 Anyone out there? ehehhe Still hopeing to get this up and running soon.. if anyone can help i will post anything you need.. i just want this fixed so i can populate the store!
Nullachtfuffzehn Posted September 29, 2007 Posted September 29, 2007 I was looking at the code, but couldn't find any reason why there should be a division by zero... Can you describe exactly what you were doing to get that error?
davec1031 Posted September 29, 2007 Author Posted September 29, 2007 Ok i was testing the cart, trying to see if it worked ok, just adding some items to the cart, and as soon as i went to hit add to cart on the first item, it just went to that message.. Warning: Division by zero in /homepages/17/d144609194/htdocs/valkyriesreign/includes/application_top.php on line 477 Warning: Cannot modify header information - headers already sent by (output started at /homepages/17/d144609194/htdocs/valkyriesreign/includes/application_top.php:477) in /homepages/17/d144609194/htdocs/valkyriesreign/includes/functions/general.php on line 33 So if thier is any file someone needs to see i will post it here.. any help would be awsome, the site is nearly finished, and needs stock!! ehehe I want it to be working when it goes live! if you want check out the site, and see if it is doing it for you. http://www.valkyriesreign.com
Nullachtfuffzehn Posted September 30, 2007 Posted September 30, 2007 Your product_info.php is messed up somehow. The products_id isn't even set. So no wonder the add to cart process doesn't work. Post your product_info.php and your application_top.php in a codebox please.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.