Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cart only after logging in


crowd

Recommended Posts

Posted

Sorry, i failed to find it within the forum.

I want the cart for authorized users only.

I need it to be like this - on pressing "Add to cart" a new / unlogged user gets to registration / log in page, and only after signing in the cart should display the product.

Posted

On your catalog / shopping_Cart.php after line 13 

  require("includes/application_top.php");

add 

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

 

so it looks like

 

  require("includes/application_top.php");
// 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'));
  }

 

 

 

 

 

 

Nic

 

 

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Archived

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

×
×
  • Create New...