Page 3 of 21 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 209
  1. #21
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    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.

  2. #22
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    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
    Over 15 years with Zencart

  3. #23
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    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

  4. #24
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    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, after
    Code:
    <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" />
    insert
    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-->
    and at about line 85 (having done the above), just after
    Code:
    <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" />
    insert
    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
    Over 15 years with Zencart

  5. #25
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Quote Originally Posted by crazy_chris View Post
    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"
    Hopefully later today. Thanks.
    Development Manager @ JSWeb Ltd
    Over 15 years with Zencart

  6. #26
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    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...
    Attached Files Attached Files
    Development Manager @ JSWeb Ltd
    Over 15 years with Zencart

  7. #27
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Nice one

    Downloaded and added to my infinite todo list


    Edit: hey the download isn't counted..

  8. #28
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    this looks good...

    well done ryk!

  9. #29
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    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
    Over 15 years with Zencart

  10. #30
    Join Date
    Sep 2006
    Posts
    61
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    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

 

 
Page 3 of 21 FirstFirst 1234513 ... LastLast

Similar Threads

  1. Admin auto login for a cron job
    By Gigo in forum Customization from the Admin
    Replies: 20
    Last Post: 9 Aug 2012, 07:39 AM
  2. Is there a way to auto-login to admin?
    By mikejd in forum General Questions
    Replies: 4
    Last Post: 3 Nov 2009, 09:55 AM
  3. Auto-switching DB login to end 1226 Error
    By Camarilladee in forum Basic Configuration
    Replies: 7
    Last Post: 2 Jun 2006, 05:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR