no, 72 is too early, better go around 90 after the "$_SESSION['..." part.
the best place is just after $_SESSION['cart']->restore_contents(); which is line 91 here.
this is very important and might likely be the reason for your problem
no, 72 is too early, better go around 90 after the "$_SESSION['..." part.
the best place is just after $_SESSION['cart']->restore_contents(); which is line 91 here.
this is very important and might likely be the reason for your problem
Last edited by crazy_chris; 23 Feb 2007 at 12:02 PM.
OK, that's all working now, and thanks very much for your help.
Now please don't take this the wrong way because you've done excellent work here and I really appreciate your assistance, but remember that what seems obvious to you when you're talking about code is not necessarily obvious to non-coders. If you could be as specific as possible (eg. "line 123 on an original copy of filename blah blah" or, as you just did "just after $_SESSION['cart']->restore_contents();") that makes life sooo much easier for old duffers like me!
Now I intend to package this up in the proper ZC module release package format if that's OK by you, and upload it to the downloads section. You will of course be credited for the code.
Development Manager @ JSWeb Ltd
20 years with Zencart this October!
hey,
fine that it's working!
thanks for the feedback - i see what you mean and totally agree. i'll try to be more specific in the future :)
if you want to realease it as module, go ahead. good idea, because zc is just lacking of that permanent login. for the credit please include "chris at linuxuser.at"
best greetings from austria,
chris
The checkbox needs to be added twice to account for the Split login option, so in includes/templates/YOUR_TEMPLATE/templates/tpl_login_default.php
At about line 52, afterinsertCode:<label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD; ?></label> <?php echo zen_draw_password_field('password', '', 'size="18" id="login-password"'); ?> <br class="clearBoth" />and at about line 85 (having done the above), just afterCode:<!--BOF Remember Me--> <label class="checkboxLabel" for="login-remember"><?php echo TEXT_REMEMBER_ME;?></label> <?php echo zen_draw_checkbox_field('permLogin', '1', false, 'id="permLogin"');?> <br class="clearBoth" /> <!--EOF Remember Me-->insertCode:<label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD; ?></label> <?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password') . ' id="login-password"'); ?> <br class="clearBoth" />Code:<!--BOF Remember Me--> <label class="checkboxLabel" for="login-remember"><?php echo TEXT_REMEMBER_ME;?></label> <?php echo zen_draw_checkbox_field('permLogin', '1', false, 'id="permLogin"');?> <br class="clearBoth" /> <!--EOF Remember Me-->
Development Manager @ JSWeb Ltd
20 years with Zencart this October!
Development Manager @ JSWeb Ltd
20 years with Zencart this October!
The problem with this as presented above is that the customer remains permanently logged in - which could irritate them. With the help of Kuroi who has added to crazy_chris's code, we are now able to offer an enhanced version which allows the store owner to set whether Automatic Login is on/off via admin AND if it is on, the customer can select log off if s/he wishes.
The customer can choose the auto login option either at account creation or at any time they log in.
Thanks to both crazy_chris and kuroi, this has now been submitted as a contribution to the downloads section in "Other Modules" - in the meantime, you can get it here...
Development Manager @ JSWeb Ltd
20 years with Zencart this October!
Nice one
Downloaded and added to my infinite todo list
Edit: hey the download isn't counted..
this looks good...
well done ryk!
The credit goes to you and kuroi - all I did was package your work to make it easier for other folks like me.
I'd venture to suggest that, with the addition of the admin switchery by kuroi, that this could now be something that may find it's way into the core of ZC.
Development Manager @ JSWeb Ltd
20 years with Zencart this October!
Ok, I have tried this a couple of times now and I wonder if I could get some help.
I fooled around with the first go around, and I could not get my computer to stay logged in, and I tried it at two different locations.
I then went and downloaded the final version from the contributions. This did not work either. Here is what is happening.
Under the "Create a Customer Profile" I get "TEXT_REMEMBER_ME" next to the tick box at the end of the new customer information. The other logon (login) area has the correct text.
I log in on either side, with a new sign up and a new login and it logs me in fine, but when I leave and come back, I am logged out again.
I have checked and updated the admin to turn on the automatic login in the "Customer Details" area, which was already reading true.
I submitted my sql database changes, so hopefully that is fine as well.
I get the cookie "zencart_cookie_permlogin"
Does anyone have any ideas what may be happening?
Thanks Pat
Bookmarks