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.

 

A specific template for VirtueMart Shoppers

A specific template for VirtueMart Shoppers

Hi,
how can I assign a specific template according to the user's shopper group.

There's no option about it in the control panel, maybe it's possible in some other way.

Thanks!

francesco.r
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: A specific template for VirtueMart Shoppers

Hi francesco.r,

You're right, there's nothing on the form about the shopper group. I made some tough decisions about which things I would put on there (since there are over 50 things that I could put), and the shopper group was not on the list. I'll take this as a vote to add it though!

However it's easy to use the PHP box to do this. To write this rule I am looking on the JomGenius page for Virtuemart: http://www.metamodpro.com/jomgenius/par … andcheckvm

$vm = JomGenius("virtuemart"); // always put this line first
if ( $vm->check("shopper_group = 5") ) return true;

That will make the rule SUCCEED if the logged in user is in shopper group 5.

If you want to check for more than one group:

$vm = JomGenius("virtuemart"); // always put this line first
if ( $vm->check("shopper_group = 5, 7, 11") ) return true;

That will make the rule SUCCEED if the user is in groups 5, 7 or 11.

Note: this rule needs to go in the PHP box in the left column, NOT the PHP box in the SUCCEED or FAIL rules.

Hope that helps,
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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: A specific template for VirtueMart Shoppers

Very helpful!
it is easier than I thought, but I'm still a beginner!

I'll try it right now!

Thanks a lot

francesco.r
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
1
User Info:
 
Total Users:
5361
Newest User:
scotti64d
Members Online:
0
Guests Online:
164

Online: 
There are no members online

Forum Legend:

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