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.

 

MetaMod in Virtuemart browse page not working

MetaMod in Virtuemart browse page not working

Hello

I have just installed MetaMod so that I can run the Virtuemart Cherry Picker module on browse pages only. I followed the recipe listed on here and modified it to show on all browse pages:

Code:

if ($option == "com_virtuemart") {

$category_id = JRequest::getVar("category_id");
$category = JRequest::getVar("category", null);
$page = JRequest::getVar("page");
if ($page == "shop.browse") {

  if ($category === '') return 53; 
}
}

Unfortunately nothing loads at all (not even blank space into the module position) when I pull up a brwose page.

The Cherry Picker module id is 53 and is enabled, but is not assigned to any menu items. I have positioned this in the 'left' position

I have also enabled MetaMod and postioned it the 'left' position. I have not assigned MetaMod to any menu items.

I am running Joomla 1.15.20, Virtuemart 1.1.5 and MetaMod 2.4.c

Any help or ideas would be greatly appreciated - Thanks.

richardrock
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: MetaMod in Virtuemart browse page not working

Hi Richard,

the "if ($category === '')" part of the rule only detects when you click on an option somewhere to view "ALL" categories (i.e. absolutely everything). If an individual category is being displayed, then that's not the same thing.

If you want to show the module on every type of category page, you can use this simplified rule:

if ( $option == "com_virtuemart" and JRequest::getVar("page") == "shop.browse" ) return 53;

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

Re: MetaMod in Virtuemart browse page not working

Hi Stephen,

Many thanks for your quick reply. The rule you have listed above does indeed now work.

However the reason I installed MetaMod in the first place was so that I could display the cherry picker on Browse pages only. Correct me if I'm wrong, but MetaMod only works if it is assigned to a menu item, and because VM only lets you navigate through to flypages on the same item id as the browse page, MetaMod will still show up on the fly page. Granted it is now an empty module (as it is not being called to load anything) but it is still filling up a position and thus altering my flypage layout. 

Is there anyway that you know of that can avoid this happening?

Hope that made sense - I am happy to provide screen shots if not.

Thanks very much

richardrock
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: MetaMod in Virtuemart browse page not working

See this FAQ:

http://www.metamodpro.com/metamod/faq/2 … etamod-was

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

Re: MetaMod in Virtuemart browse page not working

Thanks - will upgrade to pro now!

richardrock
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: MetaMod in Virtuemart browse page not working

Hi Stephen,

I just upgraded to pro, but this hasn't fixed the problem. I have made sure the plugin is enabled, but it doesn't seem to make a difference.

Below are some screen shots to show you how things look.

http://www.avantvogue.com/images/metmod_problem_browse.jpg
http://www.avantvogue.com/images/metmod_problem_flypage.jpg

Thanks

EDIT

I have now solved this issue by making sure MetaModPro is the highest ordered system plugin. Thanks for the help!

richardrock
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: MetaMod in Virtuemart browse page not working

Hi Richard, I'm glad this worked!

Best regards,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Re: MetaMod in Virtuemart browse page not working

Hi Stephen,
I just bought metamodpro.

I too have cherry picker on vm1.19 on j1.5 and  I want configure it so it only runs FROM this page http://www.domain.com/category/buy-products-online.html through to checkout .
I do not want the  cherry picker or its mootools/ javascript  to run on the rest of the site as i think it slows site down a bit and our marketing strategy is to test the efficacy of the http://www.domain.com/category/buy-products-online.html first .

can u please fastrack me through an approach to this - i am not a programmer.

swacks
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: MetaMod in Virtuemart browse page not working

Hi Swacks,

sorry I didn't reply to this post earlier - I missed it somewhere along the way.

I think what we need to do in this case is to find the best way to ensure that the cherrypicker only appears on the pages that you want it to appear on.

I guess that the majority of the pages that you want it to appear on are pure VirtueMart pages (i.e. where the VM component is the main component of the page). Is that a fair assumption?

If so, you can isolate these easily, irrespective of which menu item them are on, with the following PHP in MetaMod:

Code:

if ($option == "com_virtuemart") return XXX;

// replace XXX with the module ID of the cherry picker module.

It's also possible that your buy-products-online.html page is NOT a VM page but possibly an article or some other type. If that's the case, you probably need to add another line of PHP to explicity include that type of page. So your entire PHP code in MetaMod may be something like:

Code:

$mod_id = XXX;

// replace XXX with the module ID of the cherry picker module.
if ($option == "com_virtuemart") return $mod_id;
if ($core_genius->check("article_id == YYY")) return $mod_id;
// replace YYY with the article ID of the article page you want the
// cherry picker to appear on, in addition to the other VM pages
// from the previous line.

Does that help?
Best regards,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1680
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10831
Newest User:
bluesky1
Members Online:
0
Guests Online:
127

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