Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Autologon 1.02


M@rcel

Recommended Posts

http://www.oscommerce.com/downloads.php/co...ions,744/type,3

 

Added missing JavaScript code to login.php.chg. This error lead to the readme-link not working. Thanks to Mattice for reporting this bug. :D

 

=====================

 

During testing of my "shop-to-be", I got tired of signing in each time. Furthermore the enthousiastic greeting from the standard OSC-software, calling me by name, but not really knowing who I was, became rapidly annoying. And when it annoys me, it probbably also annoys my customers! And annoyed customers is *not* what I want...

 

This contribution provides a way to deal with this. Basically, next to the email-address (which is already stored in a cookie by standard OSC-software), it also stores the md5-encrypted password. When the customer returns, this information is used to execute an automatic signin.

 

M@rcel

Greetings from Marcel

|Current version|Documentation|Contributions|

Link to comment
Share on other sites

Great contribution, except I can't get logoff to work. It keeps failing on the redirection. Basically, what happens is the logoff code runs, then it tries to redirect back to the default page, but it gives a Page Cannot Be Displayed error.

 

I think it has something to do with the fact that setting cookies is done by sending headers, and when the redirect happens, the cookie headers are incomplete or something.

 

Also, I notice that the first time I go to the catalog, it redirects me to logoff first, and I get the same behavior. But anytime I do go to logoff.php and get the error, I can manually type in the URL to my catalog, and it will go there and I will be logged off. So the logoff code is working, but the redirection is failing.

 

Any insights? I have the module disabled until I can figure out the problem. Thanks!

Ed Caggiani

Custom Porsche accessories, news, discussions

Link to comment
Share on other sites

I had the same problem... try changing the LOGOFF link in includes/headers.php from NONSSL to SSL and it will work.

 

Regards,

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Try deleting your old cookies first... that was my problem too.

I had some correspondence with the author and the old cookie turned out to be my problem... If that fails drop the author a line, he might have ideas.

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

  • 1 month later...

I've come across a problem with the AutoLogon 1.02 script.

 

When you go to logoff, you will be redirected to the default page though you will still be logged on.

 

One thing I'm thinking of is this:

Lets say you're using Internet Explorer and you select your browser to 'Remember Password for next time' it will mess up the logoff routine because it logs you back in straight away.

 

Then again, I don't use that feature of IE (switched if off first time it appeared) so there must be some other issue.

 

I came to the IE conclusion because I changed my password in 'My Account' then logged off... worked perfectly! I guess this could also be an error with way the module processes the password that's stored the cookie...

 

Hmm... I just thought of something else that may help narrow it down (this would be a good feature to add to the next version if not already included), when you change your password through 'My Account', does the AutoLogon password in your cookie get updated with the new one?

 

I'm trying to work out where the problem is... then hopefully someone in the know will help out with a way around the issue.

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

  • 1 month later...

I have install the AUtlogon 1.02... but when I go to my store

This error appears i nthe front page (default.php)

 

"Fatal error: Call to undefined function: tep_session_is_registered() in /home/***/includes/modules/autologon.php on line 18"

 

Any help? :crazy:

Link to comment
Share on other sites

  • 6 months later...

Nice contribution, but:

 

What is the point of this code :

 

../modules/autologon.php

 

if($autologon_executed != 'true'){
 $autologon_page = '<html><head><meta http-equiv="Refresh" content="0;URL=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '"></head><body></body></html>';
 $autologon_link = ((getenv('HTTPS') == 'on') ? 'https://' : 'http://') . $SERVER_NAME . $REQUEST_URI . (strpos($REQUEST_URI, "?") ? '&' : '?') . SID;
 $autologon_executed = 'true';
 if(!tep_session_is_registered('autologon_link'))
	 tep_session_register('autologon_link');
 if(!tep_session_is_registered('autologon_executed'))
	 tep_session_register('autologon_executed');
	 tep_session_close();
	 exit($autologon_page);
}

 

It seems that this code is the reason of redirecting to logoff.php at first enter on page.

 

Maybe someone allready solve it? I would appreciate your help.

 

 

Kind regards.

Tom Arbuzas

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...