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)
-   -   displaying membership levels (https://forum.x-cart.com/showthread.php?t=629)

seaCOAST 11-12-2002 02:34 PM

displaying membership levels
 
I would like to display the user's membership level in the Auth. box..

Is there a variable that will allow me to do this?

Thanks! ;)

funkydunk 11-12-2002 11:04 PM

There is a variable already shown on that template called {$redirect} that holds the membership level for the purposes of log out.

Funkydunk

seaCOAST 11-13-2002 08:36 AM

Thanks funky...

But all that displayed was "customer", "admin" etc. I'm trying to display my defined user-levels. ;)

funkydunk 11-13-2002 09:49 AM

I have messed about for a little while on this and cant see a snarty variable that seems to hold this. It seems such a simple thing.

It is shown in the modify profile page so must be available somewhere. :?: :?:

funkydunk 11-13-2002 10:02 AM

The variable is available as either:

$userinfo.pending_membership or $userinfo.membership

in the membership_signup.tpl template

but it seems to disappear from there on.

I dont know enough about how smarty works YET to help, but this is bugging me now..... :!:

seaCOAST 11-14-2002 02:17 AM

I hope I didn't make you lose any sleep, funky.... 8)

Please let me know if you find anything out and I'll do the same.

funkydunk 11-14-2002 03:08 AM

Still working on it in between paying client's work - if you suss it out can you put me out of my misery 8O

Cheers

Funkydunk

tmx 11-22-2002 04:49 PM

..The code to get it..
 
Here you go, this will work...

Code:

{section name=level loop=$membership_levels}
{if ($smarty.get.usertype eq "" and $membership_levels[level].usertype eq "C")or(($smarty.get.usertype eq $membership_levels[level].usertype) or ($active_modules.Simple_Mode ne "" and $smarty.get.usertype eq "P" and $membership_levels[level].usertype eq "A"))}
{$membership_levels[level].membership}
{/if}
{/section}


funkydunk 11-22-2002 11:19 PM

Top man - I can sleep now 8O


All times are GMT -8. The time now is 05:15 PM.

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