Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is there a way to...


themadman

Recommended Posts

Member products, meaning products that you don't see unless you login.

 

What I want to do is have an account upgrade or script installation service and charge for the setup/installation of each by making a product out of each one. I don't want to be able to see the category or products unless logged in.

 

Can someone please provide me with any information? Thanks.

Link to comment
Share on other sites

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

to the top of your index.php and product_info.php pages. You can see this code in use on the checkout and account pages.

 

Hth,

Matt

Link to comment
Share on other sites

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

to the top of your index.php and product_info.php pages.

How can i set this on certain categories? if i put it on index and product_info it will require login for any product. right? im gonna try a if else and see what damage i do.

Link to comment
Share on other sites

wow! got it first shot! heheh

thanks matt...

 

added this to top of index.php 25 being the categorie i don't want non members viewing.

 

if ($cPath == "25")
{   
if (!tep_session_is_registered('customer_id')) {
  $navigation->set_snapshot();
  tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...