| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
If statement help - wholesale | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
If statement help - wholesale
I have certain design elements that I want to display only to wholesale members. What would this IF statement look like? v 4.0.19
Thank you!
__________________
~ Andrea Beight |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
Try:
{if $userinfo.membershipid eq "X"}Show It{/if} |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
Thanks, Jon! That worked.
__________________
~ Andrea Beight |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
Actually upon further review, it looks like the elements are now being hidden from everyone, even the wholesale members.
{if $userinfo.membershipid eq "Wholesale"}
__________________
~ Andrea Beight |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
When you add the wholesale membership, it is given a numeric id. You need to use that ID, instead of the word "Wholesale."
If you login as a wholesaler, and put this in your template, it should tell you the ID: Code:
|
|||||||||
#6
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
Hi Jon,
I put that in home.tpl, but it doesn't output a number. Just "ID:" I looked in the config table in the database and it looks like the numeric ID for Wholesale members is 9, but that didn't work either. *scratching head*
__________________
~ Andrea Beight |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
What happens if you output {$userinfo}.
Does it say "Array" on the screen? |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
Nothing - blank.
__________________
~ Andrea Beight |
|||||||||
#9
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
Sorry, I customized the store I took the code from so much that it's hard to remember what's stock sometimes
Open auth.php and put this code before ?> Code:
|
|||||||||
#10
|
|||||||||
|
|||||||||
Re: If statement help - wholesale
That made the whole site blank.
__________________
~ Andrea Beight |
|||||||||
|
|||
X-Cart forums © 2001-2020
|