View Single Post
  #130  
Old 07-29-2011, 04:27 AM
 
dmpinder dmpinder is offline
 

Advanced Member
  
Join Date: Jun 2009
Posts: 86
 

Default Re: common if/then modifications I make to x-cart...

Quote:
Originally Posted by upupcreative
This may already have come up in this thread but I can't find it. I'm using 4.4.x and I don't seem to have a $user_membership variable. I want to use an if/then like the one above to show one thing on a static page if the user is a wholesale customer and something else if the user is not.

This should be close to what you need. I was having the same problem on my v4.3.1, and here is the solution:

1. In the file \include\check_useraccount.php find the following:
Code:
$mail_smarty->assign("usertype",$current_area);

... and paste underneath:
Code:
$smarty->assign("user_membership",$user_account["membership"]); $smarty->assign("user_membershipid",$user_account["membershipid"]);


This allows you to call {$user_membership} or {$user_membershipid} in the Smarty template to generate the name and ID number.

Note: You can create other variables by using the $user_account database request on line 155.

Hope this helps!

Darren
__________________
Darren

X-Cart Gold 4.3.1
Reply With Quote