Welcome Username In Header

Hello,



Will this work for the 3.0.4?



Thanks

How can this be done through my changes option, to not change the main template ?

I think yes.

If you have my_changes add-on installed, create a file:

[color=#282828][font=arial, verdana, tahoma, sans-serif]design/themes/YOUR_THEME_NAME/templates/addons/my_changes/overrides/blocks/my_account.tpl[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]copy the original code to that file, modify it, clear the template cache, and check it. [/font][/color]


[quote name='milleniumrom' timestamp='1392451718' post='177532']

How can this be done through my changes option, to not change the main template ?

[/quote]

interesting, I will do this asap in my store v4.1.2

There are some way to use the variable {$user_info.firstname} on this notice?

cqf7mO9.png

to have something like: Welcome Jhon* ?

*{$user_info.firstname}

Change the value of the successful_login language variable to "Welcome, [CUSTOMER]"

Then open the app/controllers/common/auth.php file and replace:
fn_set_notification('N', __('notice'), __('successful_login'));

with

fn_set_notification('N', __('notice'), str_replace('[CUSTOMER]', fn_get_user_name($user_data['user_id']), __('successful_login')));

(!) Not tested

Hi eComLabs 8) it works great with the first name + last name:

DM0hiOf.png

However, I would like to show only the first name like: "[Welcome! Jhon]"

What variable I have to change in the code?

Try

$user_name= db_get_field("SELECT firstname FROM ?:users WHERE user_id = ?i", $user_data['user_id']);
fn_set_notification('N', __('notice'), str_replace('[CUSTOMER]', $user_name, __('successful_login')));

It works perfectly!

n0tp0ms.png

giphy.gif

Thank you eComLabs! 8)

Another useful thing, thank you guys!

You are welcome!

Hi

dont forget, its a free addon in our store

http://www.cscart.biz/welcome-message-free-addon.html

Fotis

Hi

dont forget, its a free addon in our store

http://www.cscart.biz/welcome-message-free-addon.html

Fotis

Good, added this to the first post.

Any way to change this part to have the name instead of "Welcome MY ACCOUNT"?

c82f6-clip-21kb.jpg?nocache=1

As far as I can see, non-standard block is used in your store. Please contact developers of this block to make the necessary changes

Thanks