-
Re: Is a Permanent Login (Auto-Login) Possible?
Hey Lat9,
thanks for the awesome plugin.
I've given it a go on a 1.5.4 installation.
I decided to login, add a product to cart, and then go to home page.
I then left the test site completely alone for 24 minutes just to test it out.
After the 24 minute period, I click on a random product that is shown on the home page under the Whats New products...
It stays logged in, but the cart contents are emptied. I tested this several times, each time doing the same thing, not always clicking on a random product, simply reloading the page does the same thing.
I then tested out logging out and logging back in. The cart contents are actually restored when doing this. So it doesn't forget the cart contents, it just empties it for that session after inactivity until you log out and log back in. Any ideas?
-
Re: Is a Permanent Login (Auto-Login) Possible?
@yaseent: I've opened an issue in the plugin's GitHub repo (https://github.com/lat9/remember_me/issues/4) to track the issue that you reported.
-
Re: Is a Permanent Login (Auto-Login) Possible?
I found a solution that fixes the issue:
Open includes/classes/observers/class.remember_me_observer.php
Beneath this line:
PHP Code:
$_SESSION['customer_remembered'] = true;
Insert this:
PHP Code:
if(!$_SESSION['cart']) $_SESSION['cart'] = new shoppingCart();
$_SESSION['cart']->restore_contents();
-
Re: Is a Permanent Login (Auto-Login) Possible?
On second thought, I'm a bit concerned about this line....
PHP Code:
if(!$_SESSION['cart']) $_SESSION['cart'] = new shoppingCart();
I found this placed twice in Zen Carts original core files...but in both instances it's commented out...So it does the job, but whether it should be used...I don't know...can anyone shed light.... :/
-
Re: Is a Permanent Login (Auto-Login) Possible?
The "remember me" processing is loaded at autoload check-point #71; the cart is instantiated (if not already present) at #80 using a process very similar (it does a whole lot more) to the code you posted (that I'm going to graciously include in the plugin's next update).
I'm going to change the code you posted just a bit prior to use, to reduce the chance of receiving a PHP warning if that session-variable is not set:
Code:
if (!isset ($_SESSION['cart'])) {
$_SESSION['cart'] = new shoppingCart();
}
$_SESSION['cart']->restore_contents();
-
Re: Is a Permanent Login (Auto-Login) Possible?
This plugin is exactly what I was looking for, but I'm having real difficulties with it on ZC 1.3.9h. It seemed to be working, but it has a few major issues:
1. If you put something in your basket when logged out then try to log in, you get a "security error" message and can't log in till you empty your basket.
2. If you put something in your basket in a session, then log out, you are logged out. But as soon as you go to the page of the thing you previously put into the basket, you are magically logged in again.
3. With this plugin installed, when you log in, you don't get the "merged your visitor's cart" message at all.
I think there is something wrong with the code that merges the baskets. Is this because I'm using a 1.5.x plugin on a 1.3.9h site? If so, I'll have to wait till 1.5.5 is complete: they plan to move to that when it is released.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
hairydog
This plugin is exactly what I was looking for, but I'm having real difficulties with it on ZC 1.3.9h. ... Is this because I'm using a 1.5.x plugin on a 1.3.9h site? If so, I'll have to wait till 1.5.5 is complete: they plan to move to that when it is released.
The plugin, itself, is pretty non-intrusive ... making only a couple of template-related changes to the login/create-account form. It could be that the Zen Cart login/logoff handling and notification system has changed subtly over the past 6 or so years.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
The plugin, itself, is pretty non-intrusive ... making only a couple of template-related changes to the login/create-account form. It could be that the Zen Cart login/logoff handling and notification system has changed subtly over the past 6 or so years.
I think you are right. It works just fine on the 1.5.4 sites I've installed it on. I think I'll have to leave it till we move the 1.3.9 sites to 1.5.5 which will hopefully be released for production soon.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Hi lat9,
I've become interested in getting this plugin to remember if I was logged in using Encrypted Master Password, and act accordingly...
Basically what I've done is changed this:
PHP Code:
if (!$password_info->EOF) {
$remember_me_info = array ( 'id' => $_SESSION['customer_id'],
'password' => md5 ($this->secret . $password_info->fields['customers_password']) );
$cookie_value = base64_encode (gzcompress (serialize ($remember_me_info), 9));
setcookie ($this->cookie_name, $cookie_value, time() + $this->cookie_lifetime);
}
to this:
PHP Code:
if (!$password_info->EOF) {
$remember_me_info = array ( 'id' => $_SESSION['customer_id'],
'password' => md5 ($this->secret . $password_info->fields['customers_password']),
'emp' => $_SESSION['emp_admin_login'] );
$cookie_value = base64_encode (gzcompress (serialize ($remember_me_info), 9));
setcookie ($this->cookie_name, $cookie_value, time() + $this->cookie_lifetime);
}
So I've added in this: 'emp' => $_SESSION['emp_admin_login']
into $remember_me_info array...
It seems to be giving me the desired result.
So if I've logged into a customer account with EMP, and the session times out....When the cookie logs me back in it triggers the $_SESSION['emp_admin_login'] flag...
Just wondering if I could be missing anything...
-
Re: Is a Permanent Login (Auto-Login) Possible?
Nice integration idea, yaseent! I've reviewed your changes and the remember-me plugin's current code and I'm not clear as to how your change is working.
I'll review further over the next couple of days and give you more "proper" feedback.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Hi lat9!
Yes, exactly. I'm not sure why I thought my little one line of code would actually make this work.
Turns out my testing was completely botched by the fact that I was testing isset on $_SESSION['emp_admin_login'] rather than testing whether $_SESSION['emp_admin_login'] = true...
Wow...anyhow...
Here's what I did to solve the issue:
Below:
PHP Code:
$customers_hashed_password = (isset ($remember_info['password'])) ? $remember_info['password'] : '~~~~';
Put:
PHP Code:
$emp = (isset ($remember_info['emp'])) ? $remember_info['emp'] : false;
Then Below:
PHP Code:
$_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id'];
Put:
PHP Code:
$_SESSION['emp_admin_login'] = $emp;
Also, as per my previous change, it should remain intact:
After:
PHP Code:
'password' => md5 ($this->secret . $password_info->fields['customers_password'])
Add:
PHP Code:
, 'emp' => $_SESSION['emp_admin_login']
(including the comma for anyone unfamiliar of what's going on there)
So that it looks like:
PHP Code:
'password' => md5 ($this->secret . $password_info->fields['customers_password']), 'emp' => $_SESSION['emp_admin_login'] );
Based on a previous post with a different issue (the shopping cart restore) - we need to test if $_SESSION['emp_admin_login'] isset to avoid php errors...
So I've done this (need advice here):
Below:
PHP Code:
$password_info = $db->Execute ("SELECT customers_password FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "'");
Put:
PHP Code:
if(!isset($_SESSION['emp_admin_login']))
{
$_SESSION['emp_admin_login'] = false;
}
-
Re: Is a Permanent Login (Auto-Login) Possible?
The part to avoid php errors is completely nullifying the remember me and you end up being logged out completely, don't know what I'm doing wrong there. The rest works just fine though...
So did this,
Change:
PHP Code:
'emp' => $_SESSION['emp_admin_login']
To:
PHP Code:
'emp' => (isset ($_SESSION['emp_admin_login'])) ? $_SESSION['emp_admin_login'] : false
And remove this completely:
PHP Code:
if(!isset($_SESSION['emp_admin_login']))
{
$_SESSION['emp_admin_login'] = false;
}
-
Re: Is a Permanent Login (Auto-Login) Possible?
So I use log in as customer, and I want to have the header of that add-on force this add-on to delete the cookie or session data? so that it forces the new log-in information to take effect... but I don't know how to do this.
Right now as it is, if I log in as a customer, and I have a previous log-in remembered, the remembered log-in stays in effect, and the customer's account does not log-in because the previous one is still logged in.
Any suggestions?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
wolfderby
So I use log in as customer, and I want to have the header of that add-on force this add-on to delete the cookie or session data? so that it forces the new log-in information to take effect... but I don't know how to do this.
Right now as it is, if I log in as a customer, and I have a previous log-in remembered, the remembered log-in stays in effect, and the customer's account does not log-in because the previous one is still logged in.
Any suggestions?
You would have to initiae the logoff procedure. I'm not too sure, but I believe there's a notifier hook to initiate the logoff procedure with the Automatic Login. If I'm not mistaken, you could trigger the hook somewhere in the Log in as customer header. Are you familiar with coding?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
yaseent
You would have to initiae the logoff procedure. I'm not too sure, but I believe there's a notifier hook to initiate the logoff procedure with the Automatic Login. If I'm not mistaken, you could trigger the hook somewhere in the Log in as customer header. Are you familiar with coding?
Spot on, @yaseent! The Automatic Login plugin "expires" any cookie associated with the current login session upon logoff, whether that's a normal customer login, a Log In as Customer login or an Encrypted Master Password login.
@wolfderby, if you simply add to your "login as customer" procedure to ensure that you logoff after processing that customer-related action, then the "remembered" password will be removed so that you can then log in as a different customer.
-
Re: Is a Permanent Login (Auto-Login) Possible?
I really wish that "remember me?" checkbox to be checked by default. How to do that ?
-
Re: Is a Permanent Login (Auto-Login) Possible?
I can see now in my browser settings 10 zcrm_samehash cookies for every category page. Is that normal ?
-
Re: Is a Permanent Login (Auto-Login) Possible?
This module doesn't work. I have zcrm_xxx cookies expire in 2018 but I'm not logged into my account. No error logs. Can you give me some advise where should I look for ? I really like this module and I think is helpful.
thx
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
This module doesn't work. I have zcrm_xxx cookies expire in 2018 but I'm not logged into my account. No error logs. Can you give me some advise where should I look for ? I really like this module and I think is helpful.
thx
A link to the site? What version of Zen Cart? What version of PHP?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
A link to the site? What version of Zen Cart? What version of PHP?
FWIW, I just installed v1.4.2 of "Remember Me" on a fresh ZC 1.5.5e site using the responsive classic template without issue.
-
Re: Is a Permanent Login (Auto-Login) Possible?
My live store address: http://bit.ly/1UEDgkc
PHP Version: 5.4.45
I had no problem to install / config. / adjust template of the module.
thx
-
Re: Is a Permanent Login (Auto-Login) Possible?
@solo_400, I see the issue. Multiple cookies are being generated for each pseudo-subdirectory that is introduced by your URL mangler.
That is, on initial sign-in, the cookie is created for www.yoursite.com/shop. When I navigate to the bijuterii-din-argint/pandantive-de-argint/pandantiv-pentru-bratara-tip-charm-model-tip-murano-cod-387 product, a cookie is created for www.yoursite.com/shop/bijuterii-din-argint/pandantive-de-argint.
Let me investigate a bit further ...
-
Re: Is a Permanent Login (Auto-Login) Possible?
Phew! You were quite correct @solo_400 ... the plugin did not work!
I've submitted v1.4.3 to the Zen Cart Plugins for review; it can be downloaded here (https://www.zen-cart.com/downloads.php?do=file&id=332) once reviewed.
This release drops support for Zen Cart versions prior to 1.5.5 and contains the changes associated with the following GitHub issues:
#4: Cart emptied on session timeout.
#5: Specify domain and path for cookie (interoperation with URL modifiers).
#6: Apply PSR-2 styling to plugin-specific files.
#7: Capture session values for restoration.
#8: Use Zen Cart 1.5.5e as the change-basis for template-override changes.
You can download this version from the plugin's GitHub repository (https://github.com/lat9/remember_me/releases/tag/v1.4.3) if you want a "preview". I'll update this thread when the plugin is available from Zen Cart.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Great lat9, I was waiting for a feedback :-)
1. Can I install this new version without running remember_me_uninstall.sql ?
2. tpl_login_default.php and tpl_modules_create_account.php are the same of 1.4.2 version ?
thank you
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
Great lat9, I was waiting for a feedback :-)
1. Can I install this new version without running remember_me_uninstall.sql ?
2. tpl_login_default.php and tpl_modules_create_account.php are the same of 1.4.2 version ?
thank you
You can upgrade without running the uninstall SQL, but the template-override files have changed from 1.4.2 to add changes introduced in Zen Cart 1.5.5e. If you have already installed (and possibly merged those files with your custom changes), you don't need to update those template files.
You can view the plugin's current readme here.
-
Re: Is a Permanent Login (Auto-Login) Possible?
I have installed on my live store.
Is there any debug activated? I have a remember_me.log in log directory increasing fast.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
I have installed on my live store.
Is there any debug activated? I have a remember_me.log in log directory increasing fast.
Darn it; I forgot to remove that debug code. Edit /includes/classes/observers/class.remember_me_observer.php, finding this section:
Code:
protected function encodeCookie($cookie_data)
{
$cookie_data['currency'] = $_SESSION['currency'];
$cookie_data['language'] = $_SESSION['language'];
$cookie_data['languages_id'] = $_SESSION['languages_id'];
$cookie_data['languages_code'] = $_SESSION['languages_code'];
$cookie_data['cartIdSet'] = isset($_SESSION['cartID']);
$cookie_data['securityToken'] = $_SESSION['securityToken'];
error_log(date('Y-m-d H:i:s') . " encodeCookie: " . var_export($cookie_data, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return base64_encode(gzcompress(serialize($cookie_data), 9));
}
protected function removeCookie()
{
$this->setCookie('', time() - 3600);
}
protected function decodeCookie()
{
$remember_info = false;
if (isset($_COOKIE[$this->cookie_name])) {
$remember_info = base64_decode($_COOKIE[$this->cookie_name]);
if ($remember_info !== false) {
$remember_info = gzuncompress($remember_info);
if ($remember_info !== false) {
$remember_info = unserialize($remember_info);
}
}
}
error_log(date('Y-m-d H:i:s') . " decodeCookie: " . var_export($remember_info, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return $remember_info;
}
and commenting-out those debug lines:
Code:
protected function encodeCookie($cookie_data)
{
$cookie_data['currency'] = $_SESSION['currency'];
$cookie_data['language'] = $_SESSION['language'];
$cookie_data['languages_id'] = $_SESSION['languages_id'];
$cookie_data['languages_code'] = $_SESSION['languages_code'];
$cookie_data['cartIdSet'] = isset($_SESSION['cartID']);
$cookie_data['securityToken'] = $_SESSION['securityToken'];
// error_log(date('Y-m-d H:i:s') . " encodeCookie: " . var_export($cookie_data, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return base64_encode(gzcompress(serialize($cookie_data), 9));
}
protected function removeCookie()
{
$this->setCookie('', time() - 3600);
}
protected function decodeCookie()
{
$remember_info = false;
if (isset($_COOKIE[$this->cookie_name])) {
$remember_info = base64_decode($_COOKIE[$this->cookie_name]);
if ($remember_info !== false) {
$remember_info = gzuncompress($remember_info);
if ($remember_info !== false) {
$remember_info = unserialize($remember_info);
}
}
}
// error_log(date('Y-m-d H:i:s') . " decodeCookie: " . var_export($remember_info, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return $remember_info;
}
I'll get an update going ...
-
Re: Is a Permanent Login (Auto-Login) Possible?
FWIW, the update is now available on the plugin's GitHub repository: https://github.com/lat9/remember_me
I'll upload that to the Zen Cart plugins over the next couple of days.
-
Re: Is a Permanent Login (Auto-Login) Possible?
ok done.
Now another one:
zcrm_ cokie is never removed, I can see it ( chrome ), there when I visit the store and I'm not logged and even when I logout. Is this normal ?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Something doesn't work. If I close the browser and open it after some minutes, ask for login :-(
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
ok done.
Now another one:
zcrm_ cokie is never removed, I can see it ( chrome ), there when I visit the store and I'm not logged and even when I logout. Is this normal ?
Quote:
Originally Posted by
solo_400
Something doesn't work. If I close the browser and open it after some minutes, ask for login :-(
I'll look at these later today.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Thanks for the update..
Working fine for me, added additional places for COWAA so its on login, register, create and no accounts. added a peek-a-boo instructions, but not getting FontAwesome icons to show, will have to play with that some more.
ZC1.5.5e
COWAA
PHP7.1
FireFox v56.0 on Ubuntu
Cookie does what the browsers settings are. Deletes on logoff, still there on browsers close/reopen. If browser is set to delete cookies on session end, it deletes the remember me cookie too. No added code to prevent non-account users from triggering it.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
davewest
Thanks for the update..
Working fine for me, added additional places for COWAA so its on login, register, create and no accounts. added a peek-a-boo instructions, but not getting FontAwesome icons to show, will have to play with that some more.
ZC1.5.5e
COWAA
PHP7.1
FireFox v56.0 on Ubuntu
Cookie does what the browsers settings are. Deletes on logoff, still there on browsers close/reopen. If browser is set to delete cookies on session end, it deletes the remember me cookie too. No added code to prevent non-account users from triggering it.
Thanks back at you for giving it a whirl. What do you mean by the highlighted sentence?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
Thanks back at you for giving it a whirl. What do you mean by the highlighted sentence?
Tested to see if during non-account checkout if it could get triggered to save that account for auto log in.. Just a safety check, even non-account checkouts do create accounts.. and the no account page has a password field where I added the remember me checkbox.
-
Re: Is a Permanent Login (Auto-Login) Possible?
On firefox and chrome in my ipad it seems ok till now. Hope problems i reported before, were because an old chrome version.
I have another question : why between browsers content cart is not syncronized? Products added to cart in a browser are not visible in cart when I check on other browser. Evident, always logged on.
-
Re: Is a Permanent Login (Auto-Login) Possible?
@Lat9 - on Chrome is not working. I tried from 2 different pc, different chrome versions and s.o. After a while ( hours I think ) is asking for login again. Can you check please ?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
@Lat9 - on Chrome is not working. I tried from 2 different pc, different chrome versions and s.o. After a while ( hours I think ) is asking for login again. Can you check please ?
It wouldn't be the first time that Chrome threw a wrench into the session-related handling. I've noted the request and will investigate later this week.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
On firefox and chrome in my ipad it seems ok till now. Hope problems i reported before, were because an old chrome version.
I have another question : why between browsers content cart is not syncronized? Products added to cart in a browser are not visible in cart when I check on other browser. Evident, always logged on.
That's not within the realm of the plugin's processing. A cookie is set in the browser being used to access the site and used to manage that session, essentially keeping that specific session alive.
If you access the site using FireFox, then a cookie is created in the FireFox browser for that browser's use; if accessed via Chrome, then the cookie is going be created within Chrome's browser-history, available only Chrome's processing.
Quote:
Originally Posted by
solo_400
@Lat9 - on Chrome is not working. I tried from 2 different pc, different chrome versions and s.o. After a while ( hours I think ) is asking for login again. Can you check please ?
I've checked the basic handling, using Zen Cart 1.5.5e and the responsive_classic template, for Chrome and did not find any issue.
What I did was:
- Login, ticking the "Remember me?" box.
- Added a product to my cart.
- Went to checkout (sitting on the checkout_shipping page)
- Went away for a while, allowing the session to expire.
- Came back, clicked the "Continue" button and proceeded to Checkout/Payment.
If you'll provide a specific set of actions that you've taken to reproduce the issue, I can make more progress.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
Darn it; I forgot to remove that debug code. Edit /includes/classes/observers/class.remember_me_observer.php, finding this section:
Code:
protected function encodeCookie($cookie_data)
{
$cookie_data['currency'] = $_SESSION['currency'];
$cookie_data['language'] = $_SESSION['language'];
$cookie_data['languages_id'] = $_SESSION['languages_id'];
$cookie_data['languages_code'] = $_SESSION['languages_code'];
$cookie_data['cartIdSet'] = isset($_SESSION['cartID']);
$cookie_data['securityToken'] = $_SESSION['securityToken'];
error_log(date('Y-m-d H:i:s') . " encodeCookie: " . var_export($cookie_data, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return base64_encode(gzcompress(serialize($cookie_data), 9));
}
protected function removeCookie()
{
$this->setCookie('', time() - 3600);
}
protected function decodeCookie()
{
$remember_info = false;
if (isset($_COOKIE[$this->cookie_name])) {
$remember_info = base64_decode($_COOKIE[$this->cookie_name]);
if ($remember_info !== false) {
$remember_info = gzuncompress($remember_info);
if ($remember_info !== false) {
$remember_info = unserialize($remember_info);
}
}
}
error_log(date('Y-m-d H:i:s') . " decodeCookie: " . var_export($remember_info, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return $remember_info;
}
and commenting-out those debug lines:
Code:
protected function encodeCookie($cookie_data)
{
$cookie_data['currency'] = $_SESSION['currency'];
$cookie_data['language'] = $_SESSION['language'];
$cookie_data['languages_id'] = $_SESSION['languages_id'];
$cookie_data['languages_code'] = $_SESSION['languages_code'];
$cookie_data['cartIdSet'] = isset($_SESSION['cartID']);
$cookie_data['securityToken'] = $_SESSION['securityToken'];
// error_log(date('Y-m-d H:i:s') . " encodeCookie: " . var_export($cookie_data, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return base64_encode(gzcompress(serialize($cookie_data), 9));
}
protected function removeCookie()
{
$this->setCookie('', time() - 3600);
}
protected function decodeCookie()
{
$remember_info = false;
if (isset($_COOKIE[$this->cookie_name])) {
$remember_info = base64_decode($_COOKIE[$this->cookie_name]);
if ($remember_info !== false) {
$remember_info = gzuncompress($remember_info);
if ($remember_info !== false) {
$remember_info = unserialize($remember_info);
}
}
}
// error_log(date('Y-m-d H:i:s') . " decodeCookie: " . var_export($remember_info, true) . PHP_EOL, 3, DIR_FS_LOGS . '/remember_me.log');
return $remember_info;
}
I'll get an update going ...
v1.4.4 has been submitted to the plugins for review. I'll post back here once its available.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've checked the basic handling, using Zen Cart 1.5.5e and the responsive_classic template, for Chrome and did not find any issue.
What I did was:
- Login, ticking the "Remember me?" box.
- Added a product to my cart.
- Went to checkout (sitting on the checkout_shipping page)
- Went away for a while, allowing the session to expire.
- Came back, clicked the "Continue" button and proceeded to Checkout/Payment.
If you'll provide a specific set of actions that you've taken to reproduce the issue, I can make more progress.
Remember I gave you an account test on my live store? Can you do the same steps on my live store ?
I have Zen Cart 1.5.5, Database Patch Level: 1.5.5 ( not e ) Can you give me the changes 2 overwrite template files for version 1.5.5 please ?
thank you
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've checked the basic handling, using Zen Cart 1.5.5e and the responsive_classic template, for Chrome and did not find any issue.
What I did was:
- Login, ticking the "Remember me?" box.
- Added a product to my cart.
- Went to checkout (sitting on the checkout_shipping page)
- Went away for a while, allowing the session to expire.
- Came back, clicked the "Continue" button and proceeded to Checkout/Payment.
If you'll provide a specific set of actions that you've taken to reproduce the issue, I can make more progress.
1.Remember I gave you an account test on my live store? Can you do the same steps on my live store ?
2. I have Zen Cart 1.5.5, Database Patch Level: 1.5.5 ( not e ) Can you give me the changes 2 overwrite template files for version 1.5.5 please ?
3. I.ve seen some warning in my log directory:
[23-Oct-2017 08:27:57 Europe/Bucharest] PHP Warning: gzuncompress(): data error in /mystore/includes/classes/observers/class.remember_me_observer.php on line 197
[23-Oct-2017 08:27:57 Europe/Bucharest] Request URI: /mystore/bucatarie-casa/aspiratoare, IP address: 82.208.160.180
#1 gzuncompress() called at [/mystore/includes/classes/observers/class.remember_me_observer.php:197]
#2 remember_me_observer->decodeCookie() called at [/mystore/includes/classes/observers/class.remember_me_observer.php:210]
#3 remember_me_observer->refreshCookie() called at [/mystore/includes/classes/observers/class.remember_me_observer.php:48]
#4 remember_me_observer->__construct() called at [/mystore/includes/autoload_func.php:79]
#5 require(/mystore/includes/autoload_func.php) called at [/mystore/includes/application_top.php:170]
#6 require(/mystore/includes/application_top.php) called at [/mystore/index.php:26]
thank you
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
Phew! You were quite correct @solo_400 ... the plugin did not work!
I've submitted v1.4.3 to the Zen Cart Plugins for review; it can be downloaded here (
https://www.zen-cart.com/downloads.php?do=file&id=332) once reviewed.
This release
drops support for Zen Cart versions prior to 1.5.5 and contains the changes associated with the following GitHub issues:
#4: Cart emptied on session timeout.
#5: Specify domain and path for cookie (interoperation with URL modifiers).
#6: Apply PSR-2 styling to plugin-specific files.
#7: Capture session values for restoration.
#8: Use Zen Cart 1.5.5e as the change-basis for template-override changes.
You can download this version from the plugin's GitHub repository (
https://github.com/lat9/remember_me/releases/tag/v1.4.3) if you want a "preview". I'll update this thread when the plugin is available from Zen Cart.
v1.4.3 is now available for download from the Zen Cart plugins. Note that this version still contains that debug-code identified above; I'll post back again when v1.4.4 is available.
-
Re: Is a Permanent Login (Auto-Login) Possible?
ZC-1.5.5e, PHP 5.6.32, Database patch level 1.5.5 , Remember Me v1.4.4
I'm getting the following errors:
07-Dec-2017 11:02:49 America/Denver] PHP Warning: gzuncompress(): data error in /home2/sub/public_html/mywebsite/includes/classes/observers/class.remember_me_observer.php on line 199
[07-Dec-2017 11:02:49 America/Denver] Request URI: /my/Manuals/Jenn-Air_French_Fryer_Cooker_Use_and_Care_Manual?language=en, IP address: 78.46.128.204
#1 gzuncompress() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:199]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:212]
#3 remember_me_observer->refreshCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:50]
#4 remember_me_observer->__construct() called at [/home2/sub/public_html/my/includes/autoload_func.php:79]
#5 require(/home2/sub/public_html/my/includes/autoload_func.php) called at [/home2/sub/public_html/my/includes/application_top.php:170]
#6 require(/home2/sub/public_html/my/includes/application_top.php) called at [/home2/sub/public_html/my/index.php:26]
Any help would be appreciated
-
Re: Is a Permanent Login (Auto-Login) Possible?
Any idea how many products are in that remembered customer's cart?
-
Re: Is a Permanent Login (Auto-Login) Possible?
That was a digital file for download. it was downloaded last week by the customer.
-
Re: Is a Permanent Login (Auto-Login) Possible?
May I have a link to the site (via PM if you want)?
-
Re: Is a Permanent Login (Auto-Login) Possible?
I'm back here and I want to send a big Thank You to contributor of the module. Some little issues I still have to better understand, even so, a great work.
-
Re: Is a Permanent Login (Auto-Login) Possible?
ZC-1.5.5e, PHP 5.6.32, Database patch level 1.5.5 , Remember Me v1.4.4
The cookie is created inside the folder of all cookies related to mysite in chrome. The cookie does what it is supposed to do until it is removed. I'm getting errors once a day as the following:
[23-Dec-2017 04:36:31 America/Denver] Request URI: /mysite/Advertising/Buttons?zenid=0npc7ae12cu1orqumv1srgfsj1, IP address: 64.39.140.197
#1 gzuncompress() called at [/home2/sub/public_html/mysite/includes/classes/observers/class.remember_me_observer.php:199]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/mysite/includes/classes/observers/class.remember_me_observer.php:38]
#3 remember_me_observer->__construct() called at [/home2/sub/public_html/mysite/includes/autoload_func.php:79]
#4 require(/home2/sub/public_html/mysite/includes/autoload_func.php) called at [/home2/sub/public_html/mysite/includes/application_top.php:170]
#5 require(/home2/sub/public_html/mysite/includes/application_top.php) called at [/home2/sub/public_html/mysite/index.php:26]
[23-Dec-2017 04:36:31 America/Denver] PHP Warning: gzuncompress(): data error in /home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php on line 199
[23-Dec-2017 04:36:31 America/Denver] Request URI: /mysite/Advertising/Buttons?zenid=0npc7ae12cu1orqumv1srgfsj1, IP address: 64.39.140.197
#1 gzuncompress() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:199]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:212]
#3 remember_me_observer->refreshCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:50]
#4 remember_me_observer->__construct() called at [/home2/sub/public_html/my/includes/autoload_func.php:79]
#5 require(/home2/sub/public_html/my/includes/autoload_func.php) called at [/home2/sub/public_html/my/includes/application_top.php:170]
#6 require(/home2/sub/public_html/my/includes/application_top.php) called at [/home2/sub/public_html/my/index.php:26]
It seems to attempt to decode a category cookie?
-
Re: Is a Permanent Login (Auto-Login) Possible?
@mikebr and @solo_400, I'll need to update the cookie-processing to specifically detect that gzuncompress error and generate an appropriate log record so that I've got more insight into what's going on.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
@mikebr and @solo_400, I'll need to update the cookie-processing to specifically detect that gzuncompress error and generate an appropriate log record so that I've got more insight into what's going on.
I've been getting hit with the same errors off and on.. I've traced one back to a deep crawler in my case it was a different IP, but same errors.. looking at the raw access logs of my server. megaindex(dot)com/crawler
This crawler looks to be testing hack attempts by adding things to the requested link (index.php?main_page=links_submit&lPath=2) checking out the domain and IP, which don't match, the crawler is getting used by others.. I added it to my block list of bad crawlers.
I have not had a good crawler create this error.
Under normal use, Remember me works grate. If you do add a error log code I would be interested in adding it and turning off the bot block.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Thanks, Dave. I've recorded the issue in Remember Me's GitHub repository and should have some additional data-gathering real-soon-now.
-
Re: Is a Permanent Login (Auto-Login) Possible?
I've made some updates to the plugin's observer-class script to gather additional information when the gzuncompress issue occurs and also updated the processing when the cookie can't be decoded.
If anyone would like to "vet" the changes, simply replace the contents of the file /includes/classes/observers/class.remember_me_observer.php with the updated file content here.
I'll get that packaged up for release next week unless anyone reports additional issues.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've made some updates to the plugin's observer-class script to gather additional information when the gzuncompress issue occurs and also updated the processing when the cookie can't be decoded.
If anyone would like to "vet" the changes, simply replace the contents of the file
/includes/classes/observers/class.remember_me_observer.php with the updated file content
here.
I'll get that packaged up for release next week unless anyone reports additional issues.
Updated observer class and unblock the bot... will let you know what shows up. Thanks
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've made some updates to the plugin's observer-class script to gather additional information when the gzuncompress issue occurs and also updated the processing when the cookie can't be decoded.
If anyone would like to "vet" the changes, simply replace the contents of the file
/includes/classes/observers/class.remember_me_observer.php with the updated file content
here.
I'll get that packaged up for release next week unless anyone reports additional issues.
ok, uploaded amended file, will let you know on 1st error.
-
Re: Is a Permanent Login (Auto-Login) Possible?
This is the reoccurring error I get which looks something like a cURL error...
Error log:
Code:
[24-Dec-2017 23:49:13 America/Los_Angeles] Request URI: /cbgshop/index.php?main_page=contact_us, IP address: 62.210.111.11
#1 trigger_error() called at [/***/public_html/cbgshop/includes/classes/observers/class.remember_me_observer.php:213]
#2 remember_me_observer->decodeCookie() called at [/***/public_html/cbgshop/includes/classes/observers/class.remember_me_observer.php:43]
#3 remember_me_observer->__construct() called at [/***/public_html/cbgshop/includes/autoload_func.php:79]
#4 require(/***/public_html/cbgshop/includes/autoload_func.php) called at [/***/public_html/cbgshop/includes/application_top.php:170]
#5 require(/***/public_html/cbgshop/includes/application_top.php) called at [/***/public_html/cbgshop/index.php:26]
[24-Dec-2017 23:49:13 America/Los_Angeles] PHP Warning: gzuncompress error in decodeCookie, value = deleted, _SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36, _COOKIE = array (
'zenid' => '*b6757cd96ed12416a34bc9e2',
'zcrm_dd28493d507e0c26b870d2305ebccfb9' => 'deleted',
) in /***/public_html/cbgshop/includes/classes/observers/class.remember_me_observer.php on line 213
Matched IP on the server log:
Code:
62.210.111.11 - - [24/Dec/2017:23:49:11 -0800] "GET /cbgshop/index.php?main_page=contact_us HTTP/1.1" 302 - "http://www.cowboygeek.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
62.210.111.11 - - [24/Dec/2017:23:49:12 -0800] "\x16\x03\x01\x018\x01" 404 - "-" "-"
User Tracking from site logs:
Code:
Click Count: 1
Country: France
IP Address: 62.210.111.11
Host: sender2p3.offresduweb.fr
Originating URL: http://www.cowboygeek.com Contact Us /cbgshop/index.php?main_page=contact_us
The Cookie name is on my PC and store user account I have for testing. The cookie is still active. ZenID and user folder modified.
The bad bot has not come back yet..
-
Re: Is a Permanent Login (Auto-Login) Possible?
Thanks, @davewest. I'll need to investigate why that cookie's value is coming back as "deleted"; that's the source of (at least) your issue.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
Thanks, @davewest. I'll need to investigate why that cookie's value is coming back as "deleted"; that's the source of (at least) your issue.
It looks like I need to filter a cookie-value of deleted; see this stackoverflow post for details.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
It looks like I need to filter a cookie-value of
deleted; see
this stackoverflow post for details.
I've got the remember-me processing file (see this link for the current update) to check for a cookie-value of deleted prior to additional decoding. I also thought that this would be a "good time" to ensure that the plugin's processing is disabled (i.e. no remembering) for customers currently pseudo-logged-in for a guest checkout (e.g. COWOA, COWAA).
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've got the remember-me processing file (see
this link for the current update) to check for a cookie-value of
deleted prior to additional decoding. I also thought that this would be a "good time" to ensure that the plugin's processing is disabled (i.e. no remembering) for customers currently pseudo-logged-in for a guest checkout (e.g. COWOA, COWAA).
Uploaded the new file, will see if it fires off...
I didn't add the COWOA bit.. I tested it fully with COWAA and found COWAA had good protection already in place. None account side still has a account, but theres not any way to log in to it due to a flag in the database, where the account side whether you log in or not it should not matter if Remember Me has a cookie active for they have an account. The register side behaves the same as a full account so remember me should still work there. With COWAA I have Remember Me on login, register, and no_account pages.. The password on no_account is the key, no password, no cookie is set or account is created..
I did not test with COWOA!
the logs was created when I wasn't accessing the site.
I could recreate the error by changing gzuncompress to gzdecode and didn't change things above.. I may try this again but with more code edits. Checking the manual, it has some issues with getting a none compressed string.
Theres some more hacks I want to try tomorrow, but I'm getting things ready to go out to a Xmas version of burning man this week so may have to wait until after the new year.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Hey guys, I'm so happy seeing work in progress here. lat9 and dave, I'd like to test latest changes. Can I put latest class.remember_me_observer.php ( Version: 1.4.5 ) on my live wensite? I wish all a Happy New Year also.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
Hey guys, I'm so happy seeing work in progress here. lat9 and dave, I'd like to test latest changes. Can I put latest class.remember_me_observer.php ( Version: 1.4.5 ) on my live wensite? I wish all a Happy New Year also.
Since the gzuncompress/data issue is an annoyance (the log-file generation) as opposed to a problem (i.e. it causes your site to whitescreen), I'd suggest holding off for your live site update until the updated version is released.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Thank you lat9, hope a better version will come up soon. Uhh.. I've just discover 10k log files due to gzuncompress/data issue.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Hi Lat9
An error finally surfaced:
[26-Dec-2017 18:42:44 America/Denver] Request URI: /xxx/Music/Music_Boxes/Taiwan?zenid=lvpjl451vtv5hqdeojomqe5a37, IP address: 66.249.88.60
#1 trigger_error() called at [/home2/sub/public_html/xxx/includes/classes/observers/class.remember_me_observer.php:213]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/xxx/includes/classes/observers/class.remember_me_observer.php:43]
#3 remember_me_observer->__construct() called at [/home2/sub/public_html/xxx/includes/autoload_func.php:79]
#4 require(/home2/sub/public_html/xxx/includes/autoload_func.php) called at [/home2/sub/public_html/xxx/includes/application_top.php:170]
#5 require(/home2/sub/public_html/xxx/includes/application_top.php) called at [/home2/sub/public_html/xxx/index.php:26]
[26-Dec-2017 18:42:44 America/Denver] PHP Warning: gzuncompress error in decodeCookie, value = deleted, _SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202, _COOKIE = array (
'zenid' => 'lvpjl451vtv5hqdeojomqe5a37',
'zcrm_cfb3540972e63488d12b5ebb9cd6d91f' => 'deleted',
) in /home2/sub/public_html/xxx/includes/classes/observers/class.remember_me_observer.php on line 213
This error surfaced when a customer's URL was selected from the User Tracking mod:
Thank you
-
Re: Is a Permanent Login (Auto-Login) Possible?
With version 1.5.4, the IP was recorded in user tracking, but no errors showed up. However, firefox was nice and deleted all my saved cookies, so created new with firefox both PC and android phone... Remember me is working currently with no errors. Will see if the offending IP comes back tomorrow.
Spent some time reading up on cookies, interesting ideas both sides of the fence. Downloaded some interesting code for testing, will have to compile and play later.
-
Re: Is a Permanent Login (Auto-Login) Possible?
@mikebr, that validates my take on the cause of the issue! @davewest, thanks for the continued testing.
-
Re: Is a Permanent Login (Auto-Login) Possible?
I also have user tracking module.
I installed latest class.remember_me_observer.php on 26 December and no logfiles error today.
Again thank you lat9 and long life zencart community. Happy New year guys.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
I also have user tracking module.
I installed latest class.remember_me_observer.php on 26 December and no logfiles error today.
Again thank you lat9 and long life zencart community. Happy New year guys.
That's good news, solo_400! Happy New Year to you, too!
-
Re: Is a Permanent Login (Auto-Login) Possible?
I've just submitted v1.4.5 of "Remember Me" to the Zen Cart plugins; it will be available here for download once reviewed.
This release contains changes associated with the following GitHub issues:
#10: Correct gzuncompress log-generation (cookies have been deleted).
#11: Disable processing when COWOA/guest checkout is active.
Thanks to @solo_400, @mikebr and @davewest for their help in identifying the problem (and its source) and testing the corrections.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've just submitted v1.4.5 of "Remember Me" to the Zen Cart plugins; it will be available
here for download once reviewed.
This release contains changes associated with the following GitHub issues:
#10: Correct gzuncompress log-generation (cookies have been deleted).
#11: Disable processing when COWOA/guest checkout is active.
Thanks to @solo_400, @mikebr and @davewest for their help in identifying the problem (and its source) and testing the corrections.
I've not had the same IP, but some new ones pop up without cursing error logs.. I think you got this one covered.. Thanks.
On a side note... I like to share what I did for a added layout style. I moved the checkbox in front of the wording and added a expanding info box. There are other type of info boxes but this takes the lest amount of code.
In the observer class I changed the checkbox script as this:
Code:
public function create_checkbox()
{
// return ($this->enabled) ? ('<label class="checkboxLabel" for="permLogin" title="' . TEXT_REMEMBER_ME_ALT . '">' . TEXT_REMEMBER_ME . '</label>' . zen_draw_checkbox_field ('permLogin', '1', false, 'id="permLogin"') . '<br class="clearBoth" />') : '';
return ($this->enabled) ? ( zen_draw_checkbox_field ('permLogin', '1', false, 'id="permLogin"') . '<label class="checkboxLabel" for="permLogin" title="' . TEXT_REMEMBER_ME_ALT . '">' . TEXT_REMEMBER_ME . ' <span style="cursor:pointer;color:blue;font-weight:bold;" id="dialogbox" data-text-swap=" [x]"> [?]</span> </label>') : '';
}
In the page where the script is used, such as the tpl_login_default.php anywhere near the bottom added the script:
Code:
<script type="text/javascript">
$(document).ready(function () {
$( "#dialogbox" ).click(function() {
$( ".dialog_group" ).toggle("slow");
var el = $(this);
if (el.text() == el.data('text-swap')) {
el.text(el.data('text-original'));
} else {
el.data('text-original', el.text());
el.text(el.data('text-swap'));
}
});
});
</script>
Something allot of sites have explaining what the checkbox is for. There are other ways to enhance the hover title/alt tag as will.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Good idea, @davewest, having some indication as to what is being remembered. I'll add that as a future enhancement.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Please, I need that checkbox checked by default. Is there a simple way doing this?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
Please, I need that checkbox checked by default. Is there a simple way doing this?
Quick and dirty: Edit /includes/classes/observers/class.remember_me_observer.php. Find
Code:
public function create_checkbox()
{
return ($this->enabled) ? ('<label class="checkboxLabel" for="permLogin" title="' . TEXT_REMEMBER_ME_ALT . '">' . TEXT_REMEMBER_ME . '</label>' . zen_draw_checkbox_field ('permLogin', '1', false, 'id="permLogin"') . '<br class="clearBoth" />') : '';
}
and change to
Code:
public function create_checkbox()
{
return ($this->enabled) ? ('<label class="checkboxLabel" for="permLogin" title="' . TEXT_REMEMBER_ME_ALT . '">' . TEXT_REMEMBER_ME . '</label>' . zen_draw_checkbox_field ('permLogin', '1', true, 'id="permLogin"') . '<br class="clearBoth" />') : '';
}
I'll update the plugin's GitHub repository with a change-request to make a configuration setting to make it easier for you to set that default!
-
Re: Is a Permanent Login (Auto-Login) Possible?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've just submitted v1.4.5 of "Remember Me" to the Zen Cart plugins; it will be available
here for download once reviewed.
This release contains changes associated with the following GitHub issues:
#10: Correct gzuncompress log-generation (cookies have been deleted).
#11: Disable processing when COWOA/guest checkout is active.
Thanks to @solo_400, @mikebr and @davewest for their help in identifying the problem (and its source) and testing the corrections.
v1.4.5 is now available for download.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Getting
Code:
[01-Jan-2018 06:19:52 UTC] PHP Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /home/planzen/public_html/includes/classes/observers/class.remember_me_observer.php on line 26
with planet Zen Commerce. Can PM access info if you've set it aside.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
dbltoe
Getting
Code:
[01-Jan-2018 06:19:52 UTC] PHP Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /home/planzen/public_html/includes/classes/observers/class.remember_me_observer.php on line 26
with planet Zen Commerce. Can PM access info if you've set it aside.
Well :censored: ... that's what I get making those "simple" last minute changes. The correction is to change line 26 from
Code:
$this->enabled = (defined('PERMANENT_LOGIN') && PERMANENT_LOGIN == 'true') && !isset($_SESSION['COWOA'] && !isset($_SESSION['is_guest_checkout']));
to
Code:
$this->enabled = ((defined('PERMANENT_LOGIN') && PERMANENT_LOGIN == 'true') && !isset($_SESSION['COWOA']) && !isset($_SESSION['is_guest_checkout']));
I'll get that change booked for an update.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
Well :censored: ... that's what I get making those "simple" last minute changes. The correction is to change line 26 from
Code:
$this->enabled = (defined('PERMANENT_LOGIN') && PERMANENT_LOGIN == 'true') && !isset($_SESSION['COWOA'] && !isset($_SESSION['is_guest_checkout']));
to
Code:
$this->enabled = ((defined('PERMANENT_LOGIN') && PERMANENT_LOGIN == 'true') && !isset($_SESSION['COWOA']) && !isset($_SESSION['is_guest_checkout']));
I'll get that change booked for an update.
The change is booked and v1.4.6 has been submitted to the plugins' section for review.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
The change is booked and v1.4.6 has been submitted to the plugins' section for review.
v1.4.6 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=332
-
1 Attachment(s)
Re: Is a Permanent Login (Auto-Login) Possible?
Dear friends, today I have observed that when I use facebook login ( oneall service ), zcrm_hashstring is set to expire on 1970. This prevent module working as expected.
Please see an attached picture.
Attachment 18311
Please let me know how can I solve this issue.
Many thanks
solo
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
Dear friends, today I have observed that when I use facebook login ( oneall service ), zcrm_hashstring is set to expire on 1970. This prevent module working as expected.
Please see an attached picture.
Attachment 18311
Please let me know how can I solve this issue.
Many thanks
solo
Where might I find a download of that facebook login plugin? Please note that it might be difficult for me to debug because I refuse to have a FaceBook account.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Here is the facebook login service.
https://app.oneall.com/signin/
Can you create a personal fake facebook account and use it to connect on my store http://bit.ly/1UEDgkc please ? I really need to make it work, it would be a great step forward for this nice plugin.
thank you
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
Here is the facebook login service.
https://app.oneall.com/signin/
Can you create a personal fake facebook account and use it to connect on my store
http://bit.ly/1UEDgkc please ? I really need to make it work, it would be a great step forward for this nice plugin.
thank you
Sorry, that's above-and-beyond the scope of my support of this open-source plugin. I suggest that you contact a developer to attempt the integration.
-
Re: Is a Permanent Login (Auto-Login) Possible?
hmm..
Ok, but I don't think that service set a zcrm_ cookie. Is there any 1970 default expiration date inside permanent auto login mod's code ?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
solo_400
hmm..
Ok, but I don't think that service set a zcrm_ cookie. Is there any 1970 default expiration date inside permanent auto login mod's code ?
Remember Me checks that the password supplied on any login matches the password recorded in the store's database for the associated email address. If those values don't match, the zcrm_ cookie is deleted (that's where the January 1, 1970 date comes from, since the cookie is deleted).
-
Re: Is a Permanent Login (Auto-Login) Possible?
Does this work with zen 1.5.6?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Code:
#1 trigger_error() called at [/home/cabbage/public_html/includes/classes/observers/class.remember_me_observer.php:212]
#2 remember_me_observer->decodeCookie() called at [/home/cabbage/public_html/includes/classes/observers/class.remember_me_observer.php:43]
#3 remember_me_observer->__construct() called at [/home/cabbage/public_html/includes/autoload_func.php:79]
#4 require(/home/cabbage/public_html/includes/autoload_func.php) called at [/home/cabbage/public_html/includes/application_top.php:170]
#5 require(/home/cabbage/public_html/includes/application_top.php) called at [/home/cabbage/public_html/index.php:26]
--> PHP Warning: gzuncompress error in decodeCookie, value = dsnc0xfV, _SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21, _COOKIE = array (
(DELETED ARRAY TO SAVE SPACE ON FORUM)
) in /home/cabbage/public_html/includes/classes/observers/class.remember_me_observer.php on line 212.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Are there any other logs accompanying that gzuncompress error? What's your store's settings for Configuration->Gzip settings? What sub-version of zc156? What version of PHP?
-
Re: Is a Permanent Login (Auto-Login) Possible?
What's the history of the site in question; I'll note that running the cookie-value you posted above through 'base64_decode' results in ''v����' (not exactly a character string).
Note that I'll be updating Remember Me for zc156 and later as well as One-Page Checkout interoperability on zc155. When an invalid cookie value is detected (as in the case above), the processing will subsequently remove that cookie.
-
Re: Is a Permanent Login (Auto-Login) Possible?
gzip compression was off, i've turned it on
1.5.6c
PHP Version: 5.6.40
Stuck on 5.6.40 because zencart staff won't talk to me about the problem with zen 1.5 through 1.5.6c
https://www.zen-cart.com/showthread....ith-Payflow-UK
https://www.zen-cart.com/showthread....ith-Payflow-UK
https://www.zen-cart.com/showthread....s-checkout-bug
-
Re: Is a Permanent Login (Auto-Login) Possible?
I've just submitted v2.0.0 of "Remember Me (Permanent Login)" to the Zen Cart moderators for review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#12: Swap "Remember Me?" checkbox with its label.
#13: Add a configuration switch, identifying the "Remember Me?" checkbox's default value.
#15: Add support for "One-Page Checkout" and zc156/strict PHP/MySQL installations.
#16: Update "Remember Me?" title-text to be more descriptive.
#17: Update debug-trace to output only when a customer's not logged in.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've just submitted v2.0.0 of "Remember Me (Permanent Login)" to the Zen Cart moderators for review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#12: Swap "Remember Me?" checkbox with its label.
#13: Add a configuration switch, identifying the "Remember Me?" checkbox's default value.
#15: Add support for "One-Page Checkout" and zc156/strict PHP/MySQL installations.
#16: Update "Remember Me?" title-text to be more descriptive.
#17: Update debug-trace to output only when a customer's not logged in.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=332
-
Re: Is a Permanent Login (Auto-Login) Possible?
I've just submitted v2.0.1 of Remember Me to the Zen Cart moderators for review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#18: Store cookie with the SameSite attribute; available for PHP 7.3 and later.
#19: Align guest-login template with that provided for OPC v2.3.1 and later.
I was seeing some console-logged issues for the SameSite issue, see this (https://developer.mozilla.org/en-US/...ookie/SameSite) link for additional information.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
lat9
I've just submitted v2.0.1 of
Remember Me to the Zen Cart moderators for review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#18: Store cookie with the SameSite attribute; available for PHP 7.3 and later.
#19: Align guest-login template with that provided for OPC v2.3.1 and later.
I was seeing some console-logged issues for the SameSite issue, see this (
https://developer.mozilla.org/en-US/...ookie/SameSite) link for additional information.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=332
-
Re: Is a Permanent Login (Auto-Login) Possible?
Hello.
I installed 2.01 both on a live 1.5.6A instance and a development 1.5.7. On both, the login does not seem to hold across sessions despite checking the box.
The things I changed were the secret of course, and the cookie duration to 365 days. I thought changing the cookie duration may be the problem but this does not seem to effect things. Is there a good way to troubleshoot this?
Thanks for the plugin.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Quote:
Originally Posted by
jsquared
Hello.
I installed 2.01 both on a live 1.5.6A instance and a development 1.5.7. On both, the login does not seem to hold across sessions despite checking the box.
The things I changed were the secret of course, and the cookie duration to 365 days. I thought changing the cookie duration may be the problem but this does not seem to effect things. Is there a good way to troubleshoot this?
Thanks for the plugin.
What version of PHP is in use? You can view the cookie settings using your browser's 'Developer Tools' (F12 on Windows for Firefox, Chrome and Edge) to check that the samesite attribute is being properly set.
-
Re: Is a Permanent Login (Auto-Login) Possible?
7.2 on prod, 7.3 on dev which should have that attribute. I'll check developer tools.
-
Re: Is a Permanent Login (Auto-Login) Possible?
Did a bit more checking, and noticed that when I close and reopen the browser and go to the home page, the Login link shows. But when I press login, the cookie activates and the my Account link pops up. I am then fine for the rest of the session.
So it seems as if the cookie does not get activated until the login page. So maybe something needs to be done so the cookie auto-activates on the first loading of the site on a new session?
-
Re: Is a Permanent Login (Auto-Login) Possible?
Noting that when I 'hit' the site using Chrome v86.0.4240.111, I'm not seeing that samesite cookie attribute being set for the site's zenid. That could surely have play in the issue you're describing.
-
Re: Is a Permanent Login (Auto-Login) Possible?
I'm trying to implement a confirm logout process for customers who have activated Remember Me automatic login. The purpose is to remind the users that automatic login will end if they they click logout and give them a chance to cancel the logout. But I can't identify any Remember Me public class properties or methods to test that flag users who have activated the feature. I want to use a javascript confirm() method to display the confirm window. Any hint on what variable to test would be greatly appreciated.
Dave
zc157c, php8.0.2, mysql 8.0.28
-
Re: Is a Permanent Login (Auto-Login) Possible?
When a customer is creating an account and checks remember me the error
--> PHP Warning: Undefined array key "customer_id" in /includes/classes/observers/class.remember_me_observer.php on line 97.
is thrown.
I'm don't think that their cookie is valid without the customer ID, so wrapping an isset around it doesn't make sense to me. It seems more like a timing issue.
Less importantly, probably just PHP 8.1 being picky, in circumstances I haven't yet figured out the following errors are thrown:
[22-Oct-2023 09:04:25 America/Chicago] PHP Warning: Undefined array key "languages_id" in /includes/extra_configures/enable_error_logging.php on line 84
[22-Oct-2023 09:04:25 America/Chicago] Request URI: /index.php?main_page=index, IP address: 96.33.49.112, Language id
#0 /includes/classes/observers/class.remember_me_observer.php(205): zen_debug_error_handler()
#1 /includes/classes/observers/class.remember_me_observer.php(267): remember_me_observer->encodeCookie()
#2 /includes/classes/observers/class.remember_me_observer.php(68): remember_me_observer->refreshCookie()
#3 /includes/autoload_func.php(47): remember_me_observer->__construct()
#4 /includes/application_top.php(237): require('/home/pcs/publi...')
#5 /index.php(25): require('/home/pcs/publi...')
--> PHP Warning: Undefined array key "currency" in /includes/classes/observers/class.remember_me_observer.php on line 205.
[22-Oct-2023 09:04:25 America/Chicago] PHP Warning: Undefined array key "languages_id" in /includes/extra_configures/enable_error_logging.php on line 84
[22-Oct-2023 09:04:25 America/Chicago] Request URI: /index.php?main_page=index, IP address: 96.33.49.112, Language id
#0 /includes/classes/observers/class.remember_me_observer.php(206): zen_debug_error_handler()
#1 /includes/classes/observers/class.remember_me_observer.php(267): remember_me_observer->encodeCookie()
#2 /includes/classes/observers/class.remember_me_observer.php(68): remember_me_observer->refreshCookie()
#3 /includes/autoload_func.php(47): remember_me_observer->__construct()
#4 /includes/application_top.php(237): require('/home/pcs/publi...')
#5 /index.php(25): require('/home/pcs/publi...')
--> PHP Warning: Undefined array key "language" in /includes/classes/observers/class.remember_me_observer.php on line 206.
[22-Oct-2023 09:04:25 America/Chicago] PHP Warning: Undefined array key "languages_id" in /includes/extra_configures/enable_error_logging.php on line 84
[22-Oct-2023 09:04:25 America/Chicago] Request URI: /index.php?main_page=index, IP address: 96.33.49.112, Language id
#0 /includes/classes/observers/class.remember_me_observer.php(207): zen_debug_error_handler()
#1 /includes/classes/observers/class.remember_me_observer.php(267): remember_me_observer->encodeCookie()
#2 /includes/classes/observers/class.remember_me_observer.php(68): remember_me_observer->refreshCookie()
#3 /includes/autoload_func.php(47): remember_me_observer->__construct()
#4 /includes/application_top.php(237): require('/home/pcs/publi...')
#5 /index.php(25): require('/home/pcs/publi...')
--> PHP Warning: Undefined array key "languages_id" in /includes/classes/observers/class.remember_me_observer.php on line 207.
[22-Oct-2023 09:04:25 America/Chicago] PHP Warning: Undefined array key "languages_id" in /includes/extra_configures/enable_error_logging.php on line 84
[22-Oct-2023 09:04:25 America/Chicago] Request URI: /index.php?main_page=index, IP address: 96.33.49.112, Language id
#0 /includes/classes/observers/class.remember_me_observer.php(208): zen_debug_error_handler()
#1 /includes/classes/observers/class.remember_me_observer.php(267): remember_me_observer->encodeCookie()
#2 /includes/classes/observers/class.remember_me_observer.php(68): remember_me_observer->refreshCookie()
#3 /includes/autoload_func.php(47): remember_me_observer->__construct()
#4 /includes/application_top.php(237): require('/home/pcs/publi...')
#5 /index.php(25): require('/home/pcs/publi...')
--> PHP Warning: Undefined array key "languages_code" in /includes/classes/observers/class.remember_me_observer.php on line 208.