Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Show module only for virtuemart "shoppers"

Show module only for virtuemart "shoppers"

How can show module only for all Virtuemart "shoppers" ?

Im try with this but now working !

Code:

if ( $user->usertype == "shopper" ) return 316;

Thanks in advanced.

touring
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Show module only for virtuemart "shoppers"

Hi touring,

there's a difference between Joomla groups ($user->usertype) and VirtueMart shopper groups.

Luckily with JomGenius it's easy to get hold of the shopper group, though you have to specify it by group id number rather than name.

Do it like this:

$vm = JomGenius("virtuemart");
if ($vm->check("shopper_group = 5")) return XXX;
// replace "5" with the id of the group you want to detect
// replace XXX with the module id of the module you want to show to them.


Is that what you're after? There seems to be something in VM that's called "shopper groups" which I describe above, but there's also something else called "user groups" which has a type called "shopper", and I don't know how to get at that value at the moment.

If you're using the 2nd type ("user groups") then can you describe a bit more about how you are using these? e.g. how do you assign people to a particular group? Manually? And does that then change what they can do or see in the store?

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4386
Newest User:
verlywl7
Members Online:
1
Guests Online:
586

Online: 
verlywl7

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked