Page 8 of 22 FirstFirst ... 67891018 ... LastLast
Results 71 to 80 of 219
  1. #71
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

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

    Quote Originally Posted by nagelkruid View Post
    Only drawback, it seems to be only working with IE, not with FF. Any thoughts why that may be?
    Both browsers do have the zen_perma_ coockie...
    Ignore, after clearing cache et all, it works like a charm in FF as well.

  2. #72
    Join Date
    May 2009
    Posts
    64
    Plugin Contributions
    0

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

    I have installed this Version of the Module:

    Author: Linxor
    Version: 1.3
    Zen Cart™ Version: v1.3.8
    Update added on Nov 06 2009

    The Problem I have: Going to Admin > Configuration > Customer Details I loaded the "Automatic Login (days to remember)".

    But there, I can't set the days but "true" or "false".

    So, this sql-patch is not correct:

    Code:
    insert into `configuration` (`configuration_id`,`configuration_title`,`configuration_key`,`configuration_value`,`configuration_description`,`configuration_group_id`,`sort_order`,`last_modified`,`date_added`,`use_function`,`set_function`) values ( NULL,'Automatic Login (days to remember)','PERMANENT_LOGIN_EXPIRES',14,'Automatic Login - Number of days to remember the user','5','102',NULL,now(),NULL,'zen_cfg_select_option(array("true", "false"), ');
    How do I get a input-field for days rather than "true/false"?

  3. #73
    Join Date
    Jan 2010
    Posts
    16
    Plugin Contributions
    0

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

    I installed this mod successfully. I would like to add an additional feature on the login header. If customer logged in already, i would like to display customer's first and last name follow by [Logout]. This is very similar to Welcome message on the main page, except for i would like to have it display on the header file. The benefit of it is to let customer know that his session is still active. How do i accomplish this?

    In file, /includes/languages/english/MYTEMPLATE/header.php
    I changed define('HEADER_TITLE_LOGOFF', '[Log Out]');
    to
    define('HEADER_TITLE_LOGOFF', %s[Log Out]');

    The display result shows the same. What is the actual variable to represent current user's first and last name?

  4. #74
    Join Date
    Oct 2009
    Posts
    3
    Plugin Contributions
    0

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

    i also can't get this mod work out.
    i have checked code many times
    but i can't seek any cookie should be generated.
    how can debug it.
    i am not a coder.
    anybody can help?
    also the configuration of days not work, to be true/false option.

  5. #75
    Join Date
    Jun 2006
    Posts
    403
    Plugin Contributions
    0

    help question How do I uninstall this module from the database?

    I want to uninstall this module and clear the data from the database. Anybody can help??? Thanks a lot!

  6. #76
    Join Date
    Feb 2008
    Posts
    27
    Plugin Contributions
    0

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

    Quote Originally Posted by b00n View Post
    Hi there,
    first i want to say this is a great contrib that saves a lot of time to my customers. Thanks! Also good work hareslade for exploring this contrib further and doing some good work on in.

    Now, my only problem with this contrib was, that all worked fine when customer with autologin enabled returned to the home page. But when they returned to another page, fe. product_info they weren't logged in automaticaly, because the autologin code is only in the header of index page. That can be confusing for the customer.

    What i did to fix this is i moved the block of autologin code from pages/index/header_php.php to the end of application_top.php file. Now everything works flawlessly and customer is logged in automaticaly when returning on any page of the shop. Also it seems that the zen_redirect line is not needed anymore.

    What do you think about this? I'm not sure if what i did is correct, but everything works like it should on my test site.
    Hi, just an update
    I use this module with the tip from b00n, it works OK, i have set the cookie life to 1 day, but got frustated when it loged me out the next day(when the cookie expired), i wanted each time when i visit a new page to automaticly add a new lease to the cookie(so that if it did not pass 24 hours from the last click, the site would re-issue the cookie again with the same values but a new expiry date)
    This is what i did, in includes/application_top.php (code added in red)
    Code:
    //perm login
    if (PERMANENT_LOGIN == 'true' && substr_count($_COOKIE["zen_cookie_permlogin"], "~~~") > 1) {
    		if (empty($_SESSION['customer_id'])) {
    			$c = explode("~~~", $_COOKIE["zen_cookie_permlogin"]);
    
    			$q = "SELECT customers_password FROM " . TABLE_CUSTOMERS . " WHERE customers_id=" . $c[0];
    			$r = $db->Execute($q);
    
    			$pw_cookie = zen_db_prepare_input($c[7]);
    			$pw_zencart = $r->fields['customers_password'];
    
    			if ($pw_cookie == $pw_zencart) {
    				$_SESSION['customer_id'] = $c[0];
    				$_SESSION['customer_default_address_id'] = $c[1];
    				$_SESSION['customers_authorization'] = $c[2];
    				$_SESSION['customer_first_name'] = $c[3];
    				$_SESSION['customer_last_name'] = $c[4];
    				$_SESSION['customer_country_id'] = $c[5];	
    				$_SESSION['customer_zone_id'] = $c[6];
    				
    				$_SESSION['cart']->restore_contents();
            zen_redirect( zen_href_link( $_GET['main_page'], zen_get_all_get_params() ) );
    			}
    		}
    	}
    
    	if($_SESSION['customer_id']){
    		unset($c);
    			$c[] = $_SESSION['customer_id'];
    			$c[] = $_SESSION['customer_default_address_id'];
    			$c[] = $_SESSION['customers_authorization'];
    			$c[] = $_SESSION['customer_first_name'];
    			$c[] = $_SESSION['customer_last_name'];
    			$c[] = $_SESSION['customer_country_id'];
    			$c[] = $_SESSION['customer_zone_id'];
    			$c[] = $r->fields['customers_password'];  
    
    			$c_str = implode("~~~", $c);
    			setcookie("zen_cookie_permlogin", $c_str, time() + 86400);
    	}
    ?>
    Last edited by lumpylumpy; 26 Jun 2010 at 11:51 PM. Reason: Mistake in code, corected $c[] = $check_customer->fields['customers_password']; to $c[] = $r->fields['customers_password'];

  7. #77
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

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

    Quote Originally Posted by hliang View Post
    I installed this mod successfully. I would like to add an additional feature on the login header. If customer logged in already, i would like to display customer's first and last name follow by [Logout]. This is very similar to Welcome message on the main page, except for i would like to have it display on the header file. The benefit of it is to let customer know that his session is still active. How do i accomplish this?

    In file, /includes/languages/english/MYTEMPLATE/header.php
    I changed define('HEADER_TITLE_LOGOFF', '[Log Out]');
    to
    define('HEADER_TITLE_LOGOFF', %s[Log Out]');

    The display result shows the same. What is the actual variable to represent current user's first and last name?
    $_SESSION['customer_first_name']
    $_SESSION['customer_last_name']

  8. #78
    Join Date
    Sep 2010
    Location
    Japan
    Posts
    5
    Plugin Contributions
    0

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

    Quote Originally Posted by lumpylumpy View Post
    Hi, just an update
    I use this module with the tip from b00n, it works OK, i have set the cookie life to 1 day, but got frustated when it loged me out the next day(when the cookie expired), i wanted each time when i visit a new page to automaticly add a new lease to the cookie(so that if it did not pass 24 hours from the last click, the site would re-issue the cookie again with the same values but a new expiry date)
    This is what i did, in includes/application_top.php (code added in red)
    Hey there,

    Thanks, this was helpful. The only problem is, I found it was creating multiple cookies for different paths since it is placed in the application_top file. To fix this, just set the path (and optionally the domain) when you send the cookie.

    PHP Code:
    setcookie("zencart_cookie_permlogin"$c_strtime() + $timeout"/"".yoursite.com"); 
    Make sure you set your logoff header to match.

    PHP Code:
    setcookie("zencart_cookie_permlogin""expired"time() - 3600"/"".yoursite.com"); 
    Everything is working perfectly after fixing that.

  9. #79
    Join Date
    Feb 2011
    Location
    Nysa, PL
    Posts
    2
    Plugin Contributions
    0

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

    Quote Originally Posted by Pink View Post
    I have installed this Version of the Module:

    Author: Linxor
    Version: 1.3
    Zen Cart™ Version: v1.3.8
    Update added on Nov 06 2009

    The Problem I have: Going to Admin > Configuration > Customer Details I loaded the "Automatic Login (days to remember)".

    But there, I can't set the days but "true" or "false".

    So, this sql-patch is not correct:

    Code:
    insert into `configuration` (`configuration_id`,`configuration_title`,`configuration_key`,`configuration_value`,`configuration_description`,`configuration_group_id`,`sort_order`,`last_modified`,`date_added`,`use_function`,`set_function`) values ( NULL,'Automatic Login (days to remember)','PERMANENT_LOGIN_EXPIRES',14,'Automatic Login - Number of days to remember the user','5','102',NULL,now(),NULL,'zen_cfg_select_option(array("true", "false"), ');
    How do I get a input-field for days rather than "true/false"?

    Hi all
    I also use the cited version. Quoted sql-patch is correct. This module works well in my store (1.3.9h)
    I stick PERMANENT_LOGIN_EXPIRES in includes/modules/pages/login/header.php:

    PHP Code:
    // AutomaticLogin module: Allow the user to be automatically logged in. -//
            
    if (!empty($_REQUEST["permLogin"])) {
                unset(
    $c);
                
    $c[] = $_SESSION['customer_id'];
                
    $c[] = $_SESSION['customer_default_address_id'];
                
    $c[] = $_SESSION['customers_authorization'];
                
    $c[] = $_SESSION['customer_first_name'];
                
    $c[] = $_SESSION['customer_last_name'];
                
    $c[] = $_SESSION['customer_country_id'];
                
    $c[] = $_SESSION['customer_zone_id'];
                
    $c[] = $check_customer->fields['customers_password'];

                
    $c_str implode("~~~"$c);
                
    $timeout 86400 PERMANENT_LOGIN_EXPIRES// Change the last number here to the number of days the user should stay logged in
                
    setcookie("zencart_cookie_permlogin"$c_strtime() + $timeout"/"".example.com");
            } 

    Before setting this:

    log into Your database (via phpMyAdmin),
    open "configuration" table ,
    search in "configuration_key" PERMANENT_LOGIN_EXPIRES variable,
    click "change",
    get into "set_function" field and replace:
    PHP Code:
    zen_cfg_select_option(array("true""false"), 
    with
    PHP Code:
    zen_cfg_textarea_small
    That's all - now in Admin You can set the number of days the user should stay logged in. Get: Configuration Menu - Customer Details - Automatic Login (days to remember)

    Automatic login is very necessary to professionalise the shop module, thank you very much for all of its creators. Good job!

    My test site :http://ximap.pl/www/

    Zen Cart zen-cart-v1.3.9h-full-fileset-10262010
    Mounted mods, all tested and working well in 139h ZC:
    - about_us_page_1-3-1
    - admin_login_as_customer_2-2
    - admin_profiles_1-1-1
    - attrib_image_module139h (by my additions)
    - ask_a_question_1-3-9h (by my additions)
    - AutomaticLogin-1.3.9h (by my additions)
    - CRON for Easy Populate 1.2.5.5 (by me and others)
    - css_javascript_loader
    - Easy Populate 1.2.5.5
    - image_handler 2
    - product_filter_module_for_zencart_2 (by me and others)
    - save_your_sideboxes_layout_as_the_default_1-11
    - questions_and_answers_page_1-3-1 (based on about_us_page_1-3-1)
    - search_log_2-0
    - search_configuration_keys_1-3
    - search_helper_1-0a
    - search_instock_products_only_1-0
    - single_listing_template_1-8
    - sms_on_sale_1.1a

    Uff
    Last edited by alsprog; 7 Feb 2011 at 07:03 PM.

  10. #80
    Join Date
    Feb 2011
    Location
    Nysa, PL
    Posts
    2
    Plugin Contributions
    0

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

    A small note on my test website:
    Often on this site is testing new solution, so do not be surprised if you see something wrong - this is normal when web page is in debug mode

 

 
Page 8 of 22 FirstFirst ... 67891018 ... 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