Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Private shop 2.3.1


stephen89

Recommended Posts

I am curious if there is a private shop type contribution for 2.3.1. Where the site brings you to login right in the beginning and you can't see anything until you log in.

 

Thank You,

Stephen

Link to comment
Share on other sites

bump,

 

I know this probably died because nobody that saw it has any ideas. But I decided to give it a go anyway. Even if you can't help, Maybe somebody could push me in the right direction.

 

Of course, any help at all would be appreciated.

 

Thank you,

Stephen

Link to comment
Share on other sites

Stephen, that is only a few lines addition to your application_top.php - there is no reason why it should not work for 2.3 as well

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Make your own. All you need to do is add this line of code to every file that you want private;

 

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

 

Except for login.php and create_account.php as customers would need to be able to access these in order to sign up or login.

 

Now, for people who are not signed in, they will always be redirected to login.php. On this page, you might not want any boxes to show. So these would need to be dealt with appropriately - again, the same code applies;

 

Open each box in turn, and find this:

 

$oscTemplate->addBlock($data, $this->group);

 

Change to:

 

if (tep_session_is_registered('customer_id')) $oscTemplate->addBlock($data, $this->group);

 

Completely untested. Give it a go. If it doesn't work, you haven't lost any money.

 

Maybe better than amending each box file, you might like to just turn off the columns, in this case play with the osc_template class file. Same idea, turn off the data of the customer_id session is unregistered.

Link to comment
Share on other sites

This is exactly the right direction I needed to go to. Now I just have to figure out how to make product_listing redirect when not signed in. But I am sure I can get it now that I have the general idea.

Link to comment
Share on other sites

  • 1 year later...

Archived

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

×
×
  • Create New...