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 display multiple mods all pages except front and checkout

VirtueMart display multiple mods all pages except front and checkout

Hi, i've been experimenting but without knowing php I'm lost again.

Is it possible to show multiple modules on all VirtueMart pages except the VM frontpage, cart, checkout, account admin, search and so on?

So just on the browse and details pages basically. I know usually you could do it by category but in this case there are 88 categories it would take ages to enter them all in php.

Anyway let me know what you think wink

morktron
Beginner Modder
ranks
useravatar
Offline
11 Posts
User info in posts
Administrator has disabled public posting

Re: VirtueMart display multiple mods all pages except front and checkout

Hi Morktron,

you know, I'm working on a top-secret new project called JomGenius OOPS I wasn't supposed to say that wink that allows you to specify all of those in just 1 easy line of code... but it's not ready yet.

It's still reasonably straightforward to do this the old way though:

if ( $option == "com_virtuemart" ) {
  $page = JRequest::getVar("page");
  if ( $page == "shop.browse" or $page == "shop.product_details" ) return XXX;
}

Replace XXX with the module id, or list of ids (in the form "23, 24, 25" including the quotes), or module position you want to include.

You would need to make 1 MetaMod per module position, then use each MetaMod to import the modules for that particular position.

Hope that helps,
Stephen

ps. the JomGenius syntax will be:

$vm = JomGenius("virtuemart"); // create the genius
if ( $vm->check("pagetype = shop.browse, shop.product_details") ) return XXX;

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

Re: VirtueMart display multiple mods all pages except front and checkout

Thanks Stephen, you are a legend! it works beautifully. I'm sure I'll be using this on lots of VM sites.

I look forward to seeing more of JomGenius, it sounds interesting indeed, good luck with your development phase.

Not sure what I'd do without you and MetaMod Pro, my sites are really enhanced now. Thanks for all your efforts and for taking the time to write the recipe, cheers

Mark wink

morktron
Beginner Modder
ranks
useravatar
Offline
11 Posts
User info in posts
Administrator has disabled public posting

Re: VirtueMart display multiple mods all pages except front and checkout

Hi Mark,

MetaMod 2.4c with JomGenius is now released! So you can try out that new recipe.

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

Re: VirtueMart display multiple mods all pages except front and checkout

Cool Stephen, thanks, I'll give it a go!...

morktron
Beginner Modder
ranks
useravatar
Offline
11 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Total Posts Today:
2
User Info:
 
Total Users:
4367
Newest User:
dixon45621
Members Online:
3
Guests Online:
181


Forum Legend:

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