![]() |
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! |
Re: If statement help - wholesale
Try:
{if $userinfo.membershipid eq "X"}Show It{/if} |
Re: If statement help - wholesale
Thanks, Jon! That worked. :)
|
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"} |
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:
ID: {$userinfo.membershipid} |
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* |
Re: If statement help - wholesale
What happens if you output {$userinfo}.
Does it say "Array" on the screen? |
Re: If statement help - wholesale
Nothing - blank.
|
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:
$userinfo = func_query_first("SELECT login,firstname,lastname,membershipid FROM $sql_tbl['customers'] WHERE login='$login'"); |
Re: If statement help - wholesale
That made the whole site blank. :)
|
All times are GMT -8. The time now is 12:28 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.