![]() |
[WORKING] Change welcome message based on membership
I like to change the welcome message.
If membership is still pending show the welcome message A: " your account is not activated it, please call 888-xxxx to activate your account" If member is active show the welcome message B: "Welcome back" I assume that I should change this file: File: /2-columns/customer/main/welcome.tpl But how can I make the if else statement? |
Re: How to change welcome message based on membership?
Look for $userinfo.membershipid or $userinfo.pending_membershipid. It's possible membership info is still not visible without adding it to include/check_useraccount.php:
http://forum.x-cart.com/showthread.php?t=12511&page=2 |
Re: How to change welcome message based on membership?
so I have to add the following code in file
include/check_useraccount.php $smarty->assign("user_membership",$user_account['membership']); But where? before or after which code |
Re: How to change welcome message based on membership?
You are actually looking for $user_account['membershipid'] and you can add it anywhere at the end with the other similar lines.
|
Re: How to change welcome message based on membership?
Hi Cherie, thanks for your help, but looks like I'm doing something wrong.
Step 1:. In file include/check_useraccount.php I added at the the end of the source code $smarty->assign("user_membershipid",$user_account['membershipid']); Step 2: In file 2-columns/customer/main/welcome.tpl I added the code {if $user_account.membershipid eq 6} <p> MESSAGE A </p> {else} <p>MESSAGE B </p> {/if} Still not working, it's always showing message A, no matter the it's pending membership or not. Sorry to bother you, but I'm struggling with the smarty codes. Thanks a lot for your help |
Re: How to change welcome message based on membership?
You've assigned it to user_membershipid so you'll need to check for that:
PHP Code:
|
Re: How to change welcome message based on membership?
it's working!!! Thanks a lot Cherie.
So here is the complete solution. Show message A if user member is still pending Show message B or nothing if membership is activated Step 1:. In file include/check_useraccount.php I added at the the end of the source code: Quote:
Step 2: In file 2-columns/customer/main/welcome.tpl Add the code Quote:
|
All times are GMT -8. The time now is 01:05 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.