View Single Post
  #1302  
Old 03-02-2018, 04:54 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: X-Cart - reBOOT - Responsive Template

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}
__________________
xcartmods.co.uk
Reply With Quote