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

if/then for wholesale customers...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 10-26-2011, 12:20 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: if/then for wholesale customers...

In this case you should use the instructions from my post -> http://forum.x-cart.com/showpost.php?p=315987&postcount=2

In the welcome.tpl you can use something like:

Code:
{if $user_account.membershipid eq 0} ... no membership ... {elseif $user_account.membershipid eq 9} ... specific membership ... {/if}
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
jwpenn (10-26-2011)
  #12  
Old 10-26-2011, 06:06 AM
 
jwpenn jwpenn is offline
 

Member
  
Join Date: Jul 2008
Posts: 13
 

Thumbs up Re: if/then for wholesale customers...

Quote:
Originally Posted by qualiteam
Add
Code:
$smarty->assign('user_account', @$user_account);
right before this
Code:
func_display('customer/home.tpl', $smarty);
in the "<xcart_dir>/home.php" script.

After surround the price code in products.tpl template with e.g.:
Code:
{if $user_account.membershipid eq 0} ... {/if}

this will show the price only for customers without any membership level.


Thanks this worked!
__________________
X-cart Gold
Version 4.1.9
Reply With Quote
  #13  
Old 12-27-2011, 09:49 PM
 
smek smek is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 54
 

Default Re: if/then for wholesale customers...

this is great stuff...and

{if $user_account.membershipid eq 0}
... no membership ...
{elseif $user_account.membershipid eq 9}
... specific membership ...
{/if}

works on product pages but when on homepage the
$user_account.membershipid
doesnt exist when looking at the variables in webmaster mode.

I've spent hours on this already...can't seem to get a module to ONLY SHOW if a user is logged in with a membership level.

Please help, i'm using 4.4.3
__________________
xcart 4.5.2
Reply With Quote
  #14  
Old 02-14-2013, 05:58 PM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Default Re: if/then for wholesale customers...

it doesn't work on the welcome page either.

I tried to change this file:

/2-columns/customer/main/welcome.tpl

Quote:
{if $user_account.membershipid eq 0}
... no membership ...
{elseif $user_account.membershipid eq 9}
... specific membership ...
{/if}

Please help! Using 4.4
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
Reply With Quote
  #15  
Old 02-14-2013, 06:13 PM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Default Re: if/then for wholesale customers...

can anybody whether this condition is correct?

{if $user_account.membershipid eq 0}

It doesn't recognize the condition.

I even tried:

{if $user_account.membershipid eq '0'}

and

{if $user_account.membershipid eq "0"}

They all don't work.

If want to show welcome message A to pending user with:

Sign up for membership ; Wholesale
Membership : Not member


and show welcome message B to activated user :

Sign up for membership ; Wholesale
Membership : Wholesale
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
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 03:41 PM.

   

 
X-Cart forums © 2001-2020