![]() |
have promo banner image hidden from wholesale members
x-cart version 4.4.6.
I am setting up a shipping promo. Flat $5.00 shipping on orders over $100. I am creating a banner image that will be displayed across the top of the pages. I want to set a conditional statement that will hid the banner when a wholesale member logs in. I was trying something like this... Code:
{if $login eq "" or $membershipid ne 2} It isn't working so I'm not sure what I need to use instead. Is this possible to do? Thanks. |
Re: have promo banner image hidden from wholesale members
You should only need the membershipid test, but try displaying it to see if it is present.
|
Re: have promo banner image hidden from wholesale members
Hi Cherie,
How do I display it to check? I tried looking in webmaster mode (variables) and don't see a membershipid listed. Is there a different/better way to check? |
Re: have promo banner image hidden from wholesale members
membership is part of user account info. So there is no direct membershipid variable, it will be userinfo.membershipid or user_account.membershipid or similar. Also this will apply to logged in customers only. All non-logged in customers will still see the banner which means your wholesale customers will see it until logged in - doesn't make much sense
|
Re: have promo banner image hidden from wholesale members
{$membershipid}
http://www.smarty.net/docs/en/language.syntax.variables.tpl If membershpid is not in an existing array like $userinfo then you may have to go get it, like this: https://forum.x-cart.com/showthread.php?p=353774 |
Re: have promo banner image hidden from wholesale members
Thanks Steve and Cherie,
I added Code:
$smarty->assign("user_membershipid",$user_account['membershipid']); Then I tried using both Code:
{if $userinfo.membershipid ne 2} Code:
{if $user_account.membershipid ne 2} logged in with my wholesale account and the banner still is showing up. Any idea what I am missing? As far as the wholesale accounts seeing it before they log in, I'm not too worried about it. I do have the qualifier $5 shipping on "RETAIL" orders but I thought it would be nice to hide it once they log in so it isn't sticking out like a sore thumb as they are placing their orders. |
Re: have promo banner image hidden from wholesale members
You assigned to user_membershipid which should make the following work:
{$user_membershipid} |
Re: have promo banner image hidden from wholesale members
ah, and so it does. Thanks so much.
|
All times are GMT -8. The time now is 08:46 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.