Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HTTP_POST_VARS lost in redirect


marcgaston

Recommended Posts

Hi,

 

for some of my products I want the customer to log in first before they can put it into their shopping cart.

 

When I do this the standard way using snapshot in application_top

 

     
// customer adds a product from the products page
     case 'add_product' :
       //echo 'add product - ' . $HTTP_POST_VARS['products_id'] . '<p>';
       if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
           //mgz test
           if ( ! tep_session_is_registered('customer_id')) {
             $navigation->set_snapshot();
             tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
             break 2;
           }

 

all the HTTP_POST_VARS are not restored from the snapshot. Therefore the products_id is set to null as well. When the customer returns from the login he will find an empty shopping cart.

 

How can I fix this problem?

 

Many thanks

 

Marc

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...