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

How to get the membership of a user anywhere

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-19-2005, 05:56 PM
 
snafu789 snafu789 is offline
 

Newbie
  
Join Date: Dec 2004
Posts: 7
 

Default How to get the membership of a user anywhere

Trying to figure out what I need to have access to the membership of a user on any template.

If they're on register.php, doing {$userinfo.membership} will get me what I need, but it doesn't work on home.php for example. I've been trying to figure out what loads that info, but haven't gotten it to work yet.

Can anyone point me to what I'm missing.

Thanks
__________________
-------
X-Cart Gold 4.0.8
Reply With Quote
  #2  
Old 01-20-2005, 08:47 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

This segment of code is from my wholesale tools mod.

Edit include/check_useraccount.php towards the bottom of the file where
the other smarty->assign's are add the following:
Code:
$smarty->assign("user_membership",$user_account["membership"]);

Then use:

Code:
{if $user_membership eq "Wholesale"} content {/if}
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote

The following 2 users thank B00MER for this useful post:
advantageco (08-27-2010), KaviSkin (07-31-2009)
  #3  
Old 07-19-2005, 08:23 AM
 
info@esofthosting.com info@esofthosting.com is offline
 

Newbie
  
Join Date: Nov 2004
Posts: 3
 

Default Message

Hello there...

The code works fine but how can I post a message if the customer is not logged, something like: YOU MUST BE LOGGED TO VIEW THE PRODUCTS.

Thanks,
Alex
__________________
Alex
Reply With Quote
  #4  
Old 05-10-2006, 12:37 PM
 
Inner Eye Inner Eye is offline
 

Member
  
Join Date: Jan 2005
Posts: 25
 

Default

I know this is an old post, but maybe still helpful to someone else.

Code:
{if $login eq "" } YOU MUST BE LOGGED TO VIEW THE PRODUCTS. {/if}

or if you want to display a message after they have logged:


Code:
{if $login eq "" } YOU MUST BE LOGGED TO VIEW THE PRODUCTS. {else} You are logged in! {/if}
__________________
Before you criticize someone, walk a mile in his shoes.
That way, if he gets angry, he\'ll be a mile away - and barefoot.

Version 4.0.9
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 10:39 AM.

   

 
X-Cart forums © 2001-2020