Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

require login to view site


compwhizmm90

Recommended Posts

Posted

Does anyone know of an If Statement that I could place in Applicationtop.php that would redirect the person to the login.php page if they are not logged in. I borrowed this from the prices for logged in users only contribution but it does not work properly. Here is the code :

if (!tep_session_is_registered('customer_id')) {
							$navigation->set_snapshot();
							tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
						  } else  {
						  if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
							$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  }
						  break;

When I use this I get the following error in Firefox

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Does anyone know how to fix this? Thanks

Posted

 

I was wanting the customer to not be able to view the site at all, so prices for logged in users only would not work. The other one is what I am wanting, but it has .patch files and I cannot figure out how to install it. I think the .patch files are for another o.p. system, I use windows xp. If you have any more advice I would appreciate it thanks!

Posted
Patch files are diff files. They tell you which lines to change. I looked at that contribution again, and it's pretty old.

would you know how to install them?

Posted

They are text files, so you can open them in Notepad to read. Each line has either a +, -, or nothing in front of it.

 

Nothing means "don't change this line"

- means "delete this line"

+ means "add this line"

 

There's also some other information in there. I wouldn't recommend trying this though, since it's very old. It also doesn't look like it was even finished.

Contributions

 

Discount Coupon Codes

Donations

Posted
They are text files, so you can open them in Notepad to read. Each line has either a +, -, or nothing in front of it.

 

Nothing means "don't change this line"

- means "delete this line"

+ means "add this line"

 

There's also some other information in there. I wouldn't recommend trying this though, since it's very old. It also doesn't look like it was even finished.

I don't want to mess my store up. Does anyone know another way to accomplish this?

Posted
Does anyone know of an If Statement that I could place in Applicationtop.php that would redirect the person to the login.php page if they are not logged in.

You tried this?

 

http://www.oscommerce.com/community/contributions,3399

 

The amueller version 13th Oct 2005 is pretty simple to set up: only allow login.php -page and don't forget to disable left and right columns. Oh, and then it's up to you to create the accounts and invite customers. :D

 

Seagoofy

Archived

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

×
×
  • Create New...