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

displaying membership levels

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-12-2002, 02:34 PM
  seaCOAST's Avatar 
seaCOAST seaCOAST is offline
 

X-Adept
  
Join Date: Oct 2002
Location: New Hampshire
Posts: 569
 

Default 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!
__________________
Xcart V4.5.5 Gold
seaCOAST
"Live FREE or DIE!"
Reply With Quote
  #2  
Old 11-12-2002, 11:04 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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

Funkydunk
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 11-13-2002, 08:36 AM
  seaCOAST's Avatar 
seaCOAST seaCOAST is offline
 

X-Adept
  
Join Date: Oct 2002
Location: New Hampshire
Posts: 569
 

Default

Thanks funky...

But all that displayed was "customer", "admin" etc. I'm trying to display my defined user-levels.
__________________
Xcart V4.5.5 Gold
seaCOAST
"Live FREE or DIE!"
Reply With Quote
  #4  
Old 11-13-2002, 09:49 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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.
__________________
ex x-cart guru
Reply With Quote
  #5  
Old 11-13-2002, 10:02 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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.....
__________________
ex x-cart guru
Reply With Quote
  #6  
Old 11-14-2002, 02:17 AM
  seaCOAST's Avatar 
seaCOAST seaCOAST is offline
 

X-Adept
  
Join Date: Oct 2002
Location: New Hampshire
Posts: 569
 

Default

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

Please let me know if you find anything out and I'll do the same.
__________________
Xcart V4.5.5 Gold
seaCOAST
"Live FREE or DIE!"
Reply With Quote
  #7  
Old 11-14-2002, 03:08 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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

Cheers

Funkydunk
__________________
ex x-cart guru
Reply With Quote
  #8  
Old 11-22-2002, 04:49 PM
 
tmx tmx is offline
 

Member
  
Join Date: Nov 2002
Location: Arizona (USA)
Posts: 28
 

Default ..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}
__________________
-tmx-
Reply With Quote
  #9  
Old 11-22-2002, 11:19 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Top man - I can sleep now
__________________
ex x-cart guru
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 05:26 AM.

   

 
X-Cart forums © 2001-2020