Re: common if/then modifications I make to x-cart...
This works for 4.019 for me - got tech help from xcart
You should use the following part of code for the 4.1.9 version of x-cart:
if ($user_account['membershipid'] == '2') {
<necessary code here>
}
in php scripts, but if you want the variable be accessible in smarty templates please follow the instructions below:
1. add the following part of code to the end of your '<x-cart root directory>/auth.php' file:
$smarty->assign("current_customer_membershipid", $user_account['membershipid']);
after the following strings:
$smarty->assign("printable", $printable);
$smarty->assign("logout_user", $logout_user);
2. then the following part of code can be used in templates:
{if $current_customer_membershipid eq '2'}
Text Here
{/if}
Cheers
Chris
__________________
Chris G
Humble web designer
Version 4.07 - 4.45
|