Quote:
In the welcome section of the home page (xcart) ReBoot it displays the full Name {{name}}, what can I use to only show the First Name?
|
In home.php
Before...
Code:
/**
* Assign Smarty variables and show template
*/
Insert...
Code:
if ($user_account['firstname']) {
$display_greet_visitor_firstname = ($user_account['firstname']);
$smarty->assign('display_greet_visitor_firstname', $display_greet_visitor_firstname);
}
Then in skin/reboot/custom/home/home_welcome.tpl
Replace instance(s) of...
Code:
$display_greet_visitor_name
With...
Code:
$display_greet_visitor_firstname
If you want to be able to use the first name globally, instead add the PHP code to auth.php before ?> and use Smarty {$display_greet_visitor_firstname} along with {if $login}...{/if}