Welcome to the MetaMod Support Forums.

Before posting, please check out the FAQs.


morktron
Beginner Modder
ranks
useravatar
User Info

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


Administrator has disabled public posting
metamodguy
useravatar
User Info

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 author
If you use MetaMod or MetaTemplate, please post a rating and a review at the Joomla! Extensions Directory

Administrator has disabled public posting
morktron
Beginner Modder
ranks
useravatar
User Info

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


Administrator has disabled public posting
metamodguy
useravatar
User Info

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 author
If you use MetaMod or MetaTemplate, please post a rating and a review at the Joomla! Extensions Directory

Administrator has disabled public posting
morktron
Beginner Modder
ranks
useravatar
User Info

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

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


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 1159  Total Topics: 411  Total Polls: 1  Total Posts: 1465  Total Posts Today: 10
User Info:   Newest User :  CoPilot   Members Online: 0   Guests Online: 61
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked