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

If statement to limit content by membership level

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-28-2012, 02:33 PM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default If statement to limit content by membership level

Hi,

Previous solutions to limit content access by membership don't seem to be applicable in X-Cart 4.4.5 (http://forum.x-cart.com/showthread.php?p=172832 for example)

Does anyone know how to tap into the membership level variable in X-Cart 4.4.5?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #2  
Old 02-29-2012, 01:46 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: If statement to limit content by membership level

With older versions we added the following line towards the bottom of include/check_useraccount.php:
PHP Code:
$smarty->assign('user_membershipid',$user_account['membershipid']); 
Then {$user_membershipid} is available in the template. This method may still be necessary in 4.4.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following 3 users thank cherie for this useful post:
carpeperdiem (05-08-2013), Claraweb (06-26-2013), tqualizerman (03-02-2012)
  #3  
Old 03-02-2012, 01:42 PM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: If statement to limit content by membership level

This is still working as of 4.4.5, thanks for the help!
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #4  
Old 05-08-2013, 04:11 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: If statement to limit content by membership level

This is still working as of 4.5.4
The variable is {$user_membershipid}
Works in catalog and product detail pages perfectly.
Thanks for sharing.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
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:25 AM.

   

 
X-Cart forums © 2001-2020