Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Content that is specific to one user-group Rate Topic   - - - - -

 
  • GHilton
  • Junior Member
  • Members
  • Join Date: 20-Oct 08
  • 17 posts

Posted 11 February 2013 - 01:38 PM #1

I am looking for help with a particular simple problem. Below is an outline:

I have created a user group, lets say it is called "VIP". Users can apply for this group and be approved by admin. Currently I can use this to create categories and products that are seen only by VIP members.

My aim is to create additional custom code elsewhere on the site that is ONLY seen by "VIP" users. For example, inserting custom text into the header of the site that says "VIP Access":

{if usergroup = VIP} Content Here {/if}

Can anyone help me with this?

Best Regards
GH

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 11 February 2013 - 03:53 PM #2

{if $auth.usergroup_ids == '2'}
Where '2' is your VIP usergroup ID.

Apply those {if} loops on block wrapper templates (make a renamed copy, eg. mainbox_general.tpl and its copy with the usergroups flags as mainbox_general_vip.tpl). You can then apply the appropriate wrapper to blocks you only want VIP members to see.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • GHilton
  • Junior Member
  • Members
  • Join Date: 20-Oct 08
  • 17 posts

Posted 17 March 2013 - 07:15 PM #3

Thanks, but I cannot get this code to work. The user group I am trying to create custom code for is '6'. I have tested your code multiple times and still nothing within {if}{/if} will show.

Any ideas?

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 17 March 2013 - 11:45 PM #4

Try:
{if $auth.usergroup_ids[2] == 6}

Hire StellarBytes for CS-Cart Design & Development Services

 
  • robertparacay
  • Advanced Member
  • Members
  • Join Date: 14-Nov 11
  • 116 posts

Posted 06 April 2015 - 08:14 PM #5

Worth mentioning that this works in 4.2

I use this, so thanks!

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2688 posts

Posted 07 April 2015 - 07:24 AM #6

Try to use this code
{if 6|in_array:$auth.usergroup_ids}Content Here{/if}

Where '6' is your VIP usergroup ID.

Thank you.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1249 posts

Posted 07 April 2015 - 08:09 AM #7

Please follow also our FREE add-on Product Tabs Per User Groups

I hope that helps,

---
Valentin
part of hungryweb.net

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19830 posts

Posted 07 April 2015 - 10:53 AM #8

Please check also our Additional Block Settings module

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • CS-Market
  • Senior Member
  • Authorized Reseller
  • Join Date: 06-Mar 13
  • 676 posts

Posted 07 April 2015 - 01:44 PM #9

Maybe our "Blocks by usergroups" add-on will help you.

GET A FREE QUOTE  │  CS-Cart add-ons   │   CS-Cart custom development   │  CS-Cart design integration  │  CS-Cart license

Сертифицированный разработчик на CS-Cart Русская Версия. More than 5 years experience in CS-Cart development.