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.

 

Bug with gantry template (rockettheme)

Re: Bug with gantry template (rockettheme)

If you can set up a couple of the different types I should be able to figure out what you are doing. 

I think they main thing I'm missing is - how the product flypage for each section retains the assigned template for that category.

AngelinaC
Junior Modder
ranks
useravatar
Offline
26 Posts
Administrator has disabled public posting

Re: Bug with gantry template (rockettheme)

Hi Angelina,

I've spent some time on your site - wow, it has got a bit complex, and you're stumbling over some of the deficiencies of VirtueMart and Joomla. MetaTemplate helps you get around some of these, but there are still other things that are a pain and will be a challenge to get working right.

Thanks for the chart. That does make more sense now, but I wonder if you also intended to use a particular template for the checkout process? That wasn't mentioned in the chart but I thought you wanted that.

If you want to use a certain template for just the checkout pages, then make a new MetaTemplate Pro rule, and make it the first rule in the chain. In it, select the 5 checkout pages from the VM Page Types select list (checkout.index#1-4 and checkout.thankyou) and any of the other admin pages e.g. account.billing etc. Then select the template you want to use from the dropdown list in the SUCCESS Action section.

One of the things that you may already have noticed is that when you click on an item in a category list, the top level menu item for "Haircare" gets highlighted, no matter which category or menu item you were on previously.

This is because of Itemids. Virtuemart tries to be clever when it constructs the URLs for item pages. Instead of using the Itemid of the page that it was on previously, it looks to see if there is a menu item set up with the VIrtueMart component, and uses that Itemid instead.

Because the Haircare menu item is currently the ONLY proper VM menu item on your site (the other ones are just "external" URLs), all the links end up with Itemid=188 which is the haircare item. This means that that menu item gets highlighted, and the pages will inherit any menu items that got assigned to the Haircare page too. -- this is all really ugly and hard to deal with! It's based on bad core VM behaviour.

The Module problem you could get around using MetaMod, using almost exactly the same PHP rules as I set up for MetaTemplate.

The highlighted "Haircare" menu item thing I just don't know how to fix, except for hacking core Virtuemart code.

Anyway, about the setup for the other pages, that has got the templates working properly:

For most of them I used the following PHP rule which detects if the product or category page has a particular id anywhere in its ancestry. There's not currently a GUI box for this in MTP, but I think I'm going to need to add it since it's so useful. The Category id box that *is* in MTP only searches for the category id that a product is actually directly inside, and not the parents or grandparents of that category where there are multiple levels.

$vm = JomGenius("virtuemart");
if ($vm->inCategories("6") ) return true;

That checks to see if the current category page or product page is "below" category id 6, and if so makes the rule succeed. Then I set the template to be used in the dropdown list in the SUCCEED Action.


One last thing: some of your products are in more than one category. This means that theoretically there is more than one correct template for those products, because they are technically in more than one category. For any product like that, the MetaTemplate rule that matches first will determine the template that will be used for that product. So you might want to re-shuffle some of the rules to get that working the way you want it to.

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

Re: Bug with gantry template (rockettheme)

Hi Stephen, 

I follow the concept of the order of rules.  I did read the documentation.   I first set up the live site exactly how you did the test site.  It worked fine up to that point, but I had to add many others for the rest of the tabs and article pages.  At that point, tongue splat.   

Though I get the concept of the need for the order - I'm failing to understand what it should be.  It seems the prob is my article pages. 

Is there anything else you could say to enlighten me?   If you don't mind, I'd like to ask a lot of questions so I can fully understand it.  MTP seems like a very useful tool to get better looking sites. 

(You know, when I'm reading a site for content - I don't even pay attention to the niceties - just whether the content is easily accessible!)

AngelinaC
Junior Modder
ranks
useravatar
Offline
26 Posts
Administrator has disabled public posting

Re: Bug with gantry template (rockettheme)

Hi Angelina,

I'm just working on the next version of MetaTemplate and MetaTemplate Pro that has a debugging mode in it. When you enable debugging mode and view a page, it gives you a list of all the checks that it does for each rule, and whether that rule succeeded or failed, etc. That way it's a lot easier to trace what's really going on, and I think/hope it will help you come to grips with it.

You know, I constantly struggle with the complexity of MetaMod and MetaTemplate, especially when it comes to working with complex components like VirtueMart. I wish it was easier to use! At the end of the day though, VM imposes a huge amount of complexity because it has so many different page types, and certain nasty bugs, and unfortunately the flexibility of MTP (in order to deal with VM) comes at the cost of a steeper learning curve.

If you'd like a copy of the Beta of MTP 1.8, please let me know and I'll send you a copy.

Best regards,
Stephen

p.s. go ahead and ask all those questions on the forum - just please start a new thread for it.

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

Re: Bug with gantry template (rockettheme)

Hi Stephen,   I'd love to check it out. 


Should I also remove all template rules in the regular joomla template manager? 


I like virtuemart but it is hard to find directions.   I'm not a developer as your are, but I think I know what you mean.

AngelinaC
Junior Modder
ranks
useravatar
Offline
26 Posts
Administrator has disabled public posting

Re: Bug with gantry template (rockettheme)

Hi Angelina,

The template assignments in the regular Joomla template manager can still work with MetaTemplate(Pro) - they get processed first, then the MetaTemplate rules get run. If you like using the standard ones for the basic stuff, then want to use MTP for the more complex stuff, then by all means use both.

Personally I just use MTP.... but I'm biased!

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

Re: Bug with gantry template (rockettheme)

I created a rule just for virtuemart checkout pages - it is sort of working - I was using the same template as the "main" category for the overall site, and some of the modules show up at checkout that are relative to that category.

I did put the new rule first in line like you said.  It also pulls the logo and modules from whichever category  you clicked from to get to checkout.

I don't really want modules to show at check out (I don't think they ever did before)

AngelinaC
Junior Modder
ranks
useravatar
Offline
26 Posts
Administrator has disabled public posting

Re: Bug with gantry template (rockettheme)

Hi Angelina,

this is getting too hard to diagnose by forum... could you please e-mail me some an admin login and I'll take a quick look at it?

Can you please also confirm exactly what the problem is. Is it just that you don't want the modules to show at checkout?

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

Re: Bug with gantry template (rockettheme)

Hello Stephen,

I don't see where I can just delete this - disregard the request I had posted.  It was a customer issue.  They'd forgotten things I told them NOT to do.  big_smile

AngelinaC
Junior Modder
ranks
useravatar
Offline
26 Posts
Administrator has disabled public posting

Re: Bug with gantry template (rockettheme)

ok, that's a relief!
Thanks for letting me know.

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

Board Info

Board Stats:
 
Total Topics:
1704
Total Polls:
6
Total Posts:
5973
Dormant:
User Info:
 
Total Users:
8414
Newest User:
gutsha3101
Members Online:
0
Guests Online:
185

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