Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

You last visited on ...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-17-2006, 07:52 AM
 
jdedba jdedba is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 96
 

Default You last visited on ...

In x-cart, only Admin can know a customer's "last visit" time. Can we let customer see his/her "last visit" time (like phpbb does) ? Is there any variable in x-cart holding the information?

Thanks.

Jeff
__________________
version 4.1.1
Reply With Quote
  #2  
Old 03-18-2006, 04:39 AM
 
zaa zaa is offline
 

X-Cart team
  
Join Date: Apr 2004
Location: Ulyanovsk, Russia
Posts: 125
 

Default Re: You last visited on ...

Quote:
Originally Posted by jdedba
In x-cart, only Admin can know a customer's "last visit" time. Can we let customer see his/her "last visit" time (like phpbb does) ? Is there any variable in x-cart holding the information?

Thanks.

Jeff

You may get this information by applying the following mod to your x-cart.
1. add those lines at the bottom of auth.php (just above ?> at the end of the file) in the root of your x-cart

Code:
if (!empty($login)) { $last_login_time = func_query_first_cell("SELECT last_login from {$sql_tbl['customers']} WHERE login='$login'"); $smarty->assign("last_login_time", $last_login_time); }

2. open required template file which appears in customer area, for example, skin1/authbox.tpl and add into template:

Code:
{if $last_login_time ne ""}You logged in last time at: {$last_login_time|date_format:$config.Appearance.datetime_format}{/if}
Reply With Quote
  #3  
Old 03-18-2006, 01:56 PM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

This useful code should be moved to completed mods.
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #4  
Old 03-20-2006, 06:17 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

moved
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 04-10-2006, 02:10 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

Thanks for the code, zaa - it works great!
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:30 AM.

   

 
X-Cart forums © 2001-2020