Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Members Area/User Authentication Help


KennethS

Recommended Posts

Hello,

 

I am attempting to create a User Authentication system within the osCommerce shop but not fully integrated. The ideal behind this is that I want there to be a link, the customer clicks the link, and then is asked for a Code. After entering the correct code they are taken to a members only type section.

 

I'm not very crafty with php as of yet (Do like I see it done) and I've been having difficulties with this. I've tried integrating various cookie based user authentication scripts/tools found around the net but they tend to not like the wrapper sending header information also. What I mainly need is a simple (Doesn't have to be super secure) box, if they type the correct code in they are then given a cookie and can access certain pages, otherwise trying to access those pages they are sent back to the original page with the login box.

 

If anyone knows a link to something that I could possibly pick apart or a contribution (I've searched them like crazy) that would possibly work please post it here.

 

Thanks in Advance,

 

Kenneth S.

Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Link to comment
Share on other sites

They are basic php/html files not actually stock osCommerce files. Im using the wrapper contribution because I want the member files to be seamless from the actual shop. The snag I'm at now is that wrapper.php sends the header information, and then so is my script for logging in:

 

setcookie($cookiename,$cookievalue,$cookielifetime);

 

Im not sure how I could get this sent and use the header.php file...

Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Link to comment
Share on other sites

Set up a new folder within osCommerce, and add some files to it. Take a file like privacy.php (which is empty in the default install), and save it as another name, do this for both privacy.php files, and then add the new file name to includes/filenames.php.

 

Then, use your hosting control panel to set up a user group, and password protect that new folder and assign it to that user group. You will need one 'user' (yourself) to set it up, and then you can add other 'users' to it as you want.

 

Vger

Link to comment
Share on other sites

Well I had to setup a members only area once but it had to be secure. What I did was, made a new folder called /members/. The I pw protected that folder with .htaccess. I then had to create a new /includes/configure.php, and application_top.php. I had to make configure2.php because the new files where in a new folder called /members/ and I needed to reflect that in the configure file so it new where to look for all the information. I only had to change 1 line in application_top2.php to point to the new configure file. I don't know if this will make sense to you but that is what I did.

 

-Dennis

Link to comment
Share on other sites

Thanks,

 

But I'm not looking for something like that, I'm not wanting a big access popup, nor do I need a username field, or use .htaccess. I want the publications we send out to include a code on the barcode...just 1 code. And if a person comes there, clicks on the members area link, it will check for the cookie, fire them to the correct page if the correct cookie is found, or take them to a nice column/header wrapped page. Like I said this isn't super sensitive data, just a simple gateway of sorts is all I need.

 

Kenneth S.

Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...