View Single Post
  #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