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.

 

VirtueMart - 2 rules not working as they should

VirtueMart - 2 rules not working as they should

Hey all

I have a small problem when I try to set rules for VirtueMart. I use Metatemplae (not pro), and have joomla 3 tempaltes.

Template 1 = Home
Template 2 = Product View
Template 3 = Product Browse

   Template 1 rule is:
---
$ vm = JomGenius ("VirtueMart"); / / create the genius
if ($ vm-> check ('page type = shop.product_details ")) return true;

   and @SUCCEED Action

SET: template 1
AND: Stop processing

  Template 2 rule is:
---
$ vm = JomGenius ("VirtueMart");
if ($ vm-> check ('page type = shop.cart, checkout.index # 1, # 2 checkout.index, checkout.index # 3, # 4 checkout.index, checkout.thankyou ")) return true;

  and @SUCCEED Action

SET: template 2
AND: Stop processing

------------------------------

The Meta Template rule That Is assaigned orders as one works but not the residue of the rules.

For example:

if template 1 rule is assaigned as order nr 1, it will work fine but the template rule 2 wont work. That if I change order it will be the same resualt but with template 2 rule working.

Begging for help.

Ty

munale874
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: VirtueMart - 2 rules not working as they should

Hi Ty,

I think the problem is what happens in the "Fail" actions. If you want MetaTemplate to continue to the next rule if the current rule fails, then in the fail action you need to specify "Continue to next rule".

So for each rule:
- in the succeed action, set the appropriate template, and "stop processing"
- in the fail action, don't set a template, but "continue to next rule".

Make sense?

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
3312 Posts
User info in posts
Administrator has disabled public posting

Re: VirtueMart - 2 rules not working as they should

Ty Stephen!
It works perfectly now!

munale874
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: VirtueMart - 2 rules not working as they should

Cool, I'm glad it was that simple!

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
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Posts this week:
1
User Info:
 
Total Users:
10137
Newest User:
lexispoker1
Members Online:
1
Guests Online:
250

Online: 
liaskas

Forum Legend:

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