Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add to cart -> You shopping cart is empty ???


leveera

Recommended Posts

Hello,

 

Surprisingly found a problem.

Add to Cart button don't add to cart from product page only. From any others pages it works fine.

I'm sure I have clean product_info.php

Please advice that to check

 

THANKS!

Sergei

Link to comment
Share on other sites

I found a solution but needs comments because I’m not good in php yet to understand a bug.

After a deep forum search I read post that gave me a hint to look at applications_top.php

 

------------------------------------

celiawessen wrote:

Mar 29 2006, 01:28 AM

While viewing a list of prodcuts under "What's new?" or "Featured products", the "Add to Cart" and "Buy Now!" buttons do the same thing. They invoke the "buy_now" action in "applications_top.php" to check if the product has any attributes. If the product has no attributes assigned to it, it immediately adds the product to the cart.

------------------------------------

 

I restored original applications_top.php file and “add to cart” button on product page went back to

function :) I compared the modified and non modifed codes and found only difference bellow:

 

----------------------------------- ORIGINAL:

// 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']))+1, $HTTP_POST_VARS['id']);

}

---------------------------------- MODIFIED:

// 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']);

}

 

Please explain this bug!

Thanks

 

Sergei

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...