Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Undefined Index Upon Clicking "Add In Cart"


Guest

Recommended Posts

The store I am working on has been edited by another party so I am not sure how different it is from the original but here is the error I recieve upon clicking the "add In Cart" button off of product_info.php:

 

Notice: Undefined index: id in /home/monkey/public_html/shop/includes/application_top.php on line 359

Notice: Undefined index: id in /home/monkey/public_html/shop/includes/application_top.php on line 359

Notice: Undefined index: qty in /home/monkey/public_html/shop/includes/classes/shopping_cart.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/monkey/public_html/shop/includes/application_top.php:359) in /home/monkey/public_html/shop/includes/functions/general.php on line 29

 

The important thing to note is that the product still does get added to the cart once you hit back. Then when I hit the add to cart button again I get this error:

 

Notice: Undefined index: id in /home/monkey/public_html/shop/includes/application_top.php on line 359

Notice: Undefined index: id in /home/monkey/public_html/shop/includes/application_top.php on line 359

Warning: Cannot modify header information - headers already sent by (output started at /home/monkey/public_html/shop/includes/application_top.php:359) in /home/monkey/public_html/shop/includes/functions/general.php on line 29

 

I get a similar error from the product_listing.php page as well only less intense.

 

Notice: Undefined index: qty in /home/monkey/public_html/shop/includes/classes/shopping_cart.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/monkey/public_html/shop/includes/classes/shopping_cart.php:134) in /home/monkey/public_html/shop/includes/functions/general.php on line 29

 

And again if I hit back the product has been added so I hit buy now again and it works just fine, no errors or anything.

Link to comment
Share on other sites

Alright, I figured out how to avoid these errors. It's actually a really dumb thing on my part but in application_top.php you can find this code:

 

error_reporting(E_ALL & ~E_NOTICE);

 

I must have at some point changed it to this:

 

error_reporting(E_ALL);

 

As soon as you change it back all is well. Thanks for the ample help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...