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 statement to limit content by membership level (https://forum.x-cart.com/showthread.php?t=62799)

tqualizerman 02-28-2012 02:33 PM

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?

cherie 02-29-2012 01:46 PM

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.

tqualizerman 03-02-2012 01:42 PM

Re: If statement to limit content by membership level
 
This is still working as of 4.4.5, thanks for the help!

carpeperdiem 05-08-2013 04:11 PM

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.


All times are GMT -8. The time now is 02:11 PM.

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