Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Add to Cart" not working


oscomm.1986

Recommended Posts

Posted

hello all,

 

 

The 'Add to cart' button is redirecting to the shopping cart page but not actually 'adding' the product. 'Buy Now' is working fine. Even the 'Add to Cart' was working perfectly till yesterday.

 

Any help friends. This is veryyy critical pleaseee helppppp.............

Posted

Are you linking correctly within your site http://www.oscommerce.com/forums/index.php?showtopic=330479&hl

 

otherwise we need more details, what have you done/added, is site a template, a link would help too. wink.gif

 

 

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Are you linking correctly within your site http://www.oscommerce.com/forums/index.php?showtopic=330479&hl

 

otherwise we need more details, what have you done/added, is site a template, a link would help too. wink.gif

 

 

Hi friend thanks for the reply.

We did not really edit/add anything yesterday. But we did backup the site and thatsit!! Link to the website: http://www.janilink.com/product_info.php?products_id=4914

 

As you can see the ass to cart in the above page doesnt work but in the link below i.e. in the product level listing, the button works:

 

http://www.janilink.com/neutralizer/category-html

Posted

I just found out the problem is in application_top.php.

 

// customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']);

 

$quantity in the above code is not being recognized. It is supposed to catch the quantity value from product_info.php page's code:

 

<font style="font-size:13px" face="product-font" color="#646464">Qty :  </font><input type="text" name="quantity" value="1" maxlength="2" size="4">

 

but its unable to do so...

 

if I replace $quantity with a number, its working fine. But we need quantity because without quantity the user is unable to add multiple quantity. It might be a very simple thing which I am missing as to why $quantity is not being recognized. Can anybody help me pleaseeeee.....

Posted

I assume you have altered things & are saying your having trouble getting your code to work.

 

As you have not ghiven your code I cannot say where u went wrong. huh.gif

 

Perhaps this contrib will help u as the code in that works. smile.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

I assume you have altered things & are saying your having trouble getting your code to work.

 

As you have not ghiven your code I cannot say where u went wrong. huh.gif

 

Perhaps this contrib will help u as the code in that works. smile.gif

 

Hi Sam

 

Thanks for the reply. I solved it yesterday. And yes you are right. The code has been changed (not by me). This is not my store. I am an employee and I joined recently!

Archived

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

×
×
  • Create New...