X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   if/then for wholesale customers... (https://forum.x-cart.com/showthread.php?t=58960)

qualiteam 10-26-2011 12:20 AM

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}


jwpenn 10-26-2011 06:06 AM

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! :D/

smek 12-27-2011 09:49 PM

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

chiactivate 02-14-2013 05:58 PM

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

chiactivate 02-14-2013 06:13 PM

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


All times are GMT -8. The time now is 03:19 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.