| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
If statement help - wholesale | ||||
![]() |
|
|||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||||
|
|||||||||
|
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
|
|||||||||
|
|||||||||
|
Try:
{if $userinfo.membershipid eq "X"}Show It{/if} |
|||||||||
|
#3
|
|||||||||
|
|||||||||
|
Thanks, Jon! That worked.
__________________
~ Andrea Beight |
|||||||||
|
#4
|
|||||||||
|
|||||||||
|
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
|
|||||||||
|
|||||||||
|
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
|
|||||||||
|
|||||||||
|
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
|
|||||||||
|
|||||||||
|
What happens if you output {$userinfo}.
Does it say "Array" on the screen? |
|||||||||
|
#8
|
|||||||||
|
|||||||||
|
Nothing - blank.
__________________
~ Andrea Beight |
|||||||||
|
#9
|
|||||||||
|
|||||||||
|
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
|
|||||||||
|
|||||||||
|
That made the whole site blank.
__________________
~ Andrea Beight |
|||||||||
|
|
|||
|
X-Cart forums © 2001-2020
|
|||