X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to get the membership of a user anywhere (https://forum.x-cart.com/showthread.php?t=11578)

snafu789 01-19-2005 05:56 PM

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

B00MER 01-20-2005 08:47 AM

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}

info@esofthosting.com 07-19-2005 08:23 AM

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

Inner Eye 05-10-2006 12:37 PM

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}



All times are GMT -8. The time now is 08:17 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.