compwhizmm90 Posted March 7, 2006 Posted March 7, 2006 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 properlyFirefox 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
kgt Posted March 8, 2006 Posted March 8, 2006 Would any of these work instead? http://www.oscommerce.com/community/contributions,601 http://www.oscommerce.com/community/contributions,999 Contributions Discount Coupon Codes Donations
compwhizmm90 Posted March 8, 2006 Author Posted March 8, 2006 Would any of these work instead? http://www.oscommerce.com/community/contributions,601 http://www.oscommerce.com/community/contributions,999 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!
kgt Posted March 8, 2006 Posted March 8, 2006 Patch files are diff files. They tell you which lines to change. I looked at that contribution again, and it's pretty old. Contributions Discount Coupon Codes Donations
compwhizmm90 Posted March 8, 2006 Author Posted March 8, 2006 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?
kgt Posted March 8, 2006 Posted March 8, 2006 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
compwhizmm90 Posted March 8, 2006 Author Posted March 8, 2006 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?
Seagoofy Posted March 8, 2006 Posted March 8, 2006 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.