Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy Now Button Problems


Guest

Recommended Posts

Posted

This appears to be due to the logged in show prices contrib. I have tried official support but no one is home.

 

My logged in show prices on the "Buy Now" button will ad the item to the cart, BUT logs the person OFF and returns them the the same product page they are on

 

It does NOT happen on the "Add to Cart" button.

 

Do anyone have - or had - the same problem or any ideas on how to fix it?

 

I personally think the problem is in catalog/includes/application_top.php with this piece of the code below:

 

// performed by the 'buy now' button in product listings and review page

case 'buy_now' :

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

} else {

if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

} else {

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

}

break;

 

The code for the case 'add_product' is identical except it uses $HTTP_POST_VARS and not the $HTTP_GET_VARS that the case 'buy_now' uses above

 

I don't know the difference in the POST or GET - but the add product case works fine

 

Any help would be greatly appreciated

 

Bob

Archived

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

×
×
  • Create New...