Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to change welcome message based on membership?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-14-2013, 05:42 PM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Smile [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?
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!

Last edited by chiactivate : 02-19-2013 at 09:55 AM. Reason: found the solution - want to share with people
Reply With Quote
  #2  
Old 02-15-2013, 04:35 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default 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
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following user thanks cherie for this useful post:
chiactivate (02-15-2013)
  #3  
Old 02-15-2013, 06:21 PM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Default 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
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
Reply With Quote
  #4  
Old 02-16-2013, 12:50 AM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default 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.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following user thanks cherie for this useful post:
chiactivate (02-18-2013)
  #5  
Old 02-18-2013, 03:58 PM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Default 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
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
Reply With Quote
  #6  
Old 02-18-2013, 10:46 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default 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:
{if $user_membershipid eq 6}
... 
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following user thanks cherie for this useful post:
chiactivate (02-19-2013)
  #7  
Old 02-19-2013, 09:52 AM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Default 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:
$smarty->assign("user_membershipid",$user_account['membershipid']);

Step 2:

In file 2-columns/customer/main/welcome.tpl

Add the code

Quote:

{if $user_membershipid eq 6} eq 0}

<p> MESSAGE A </p>
{else}
<p>MESSAGE B </p>
{/if}
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:15 AM.

   

 
X-Cart forums © 2001-2020