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.

 

Browse vs flypage dynamics

Browse vs flypage dynamics

Hi,
I have decided to make some changes on my site, one of them is to remove all menues from the flypage. Right now i use metamodule pro to controll which VM category module i show on what browse, and consequently, the same category module appear on the flypage as well. But, in short, now i want to keep the module system i already have, but i dont want the module to appear on the flypage.

Here are the current codes im using:

$vm = JomGenius("virtuemart");

if ($vm->check("pagetype = shop.cart")) return;

if ($vm->check("pagetype = shop.cart")) return 144;

if ($vm->check( "category_id = 1,2,3,4,5,6,16,17,18,19,20,27,25,26,28,29,30" ) ) return "184, 164, 167, 166, 169, 171,";

if ($vm->check( "category_id = 35,36,37,38" ) ) return "185";

if ($vm->check( "category_id = 22,23,24,21,32,33" ) ) return "183";

if ( $vm->check("pagetype = shop.product_details") ) {
  return "164, 167, 166, 169, 176, 171,";
}


Thanks for feedback

Edited By: Tormodnor
13-Nov-11 08:45:15

Tormodnor
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Browse vs flypage dynamics

The flypage... that's "shop.product_details" isn't it?

Ok, so we'll just add a check for that and make sure the category pages don't get triggered if you're on that page:


$vm = JomGenius("virtuemart");

// don't display on shop.cart pages
if ($vm->check("pagetype = shop.cart")) return;

// following line is useless because it already
// returned "no module" for shop.cart pages.
// if ($vm->check("pagetype = shop.cart")) return 144;

// we've just moved this one ABOVE the category checks, so if we're
// on the product_details pages, this list of modules is returned,
// and it does not get any further.
if ( $vm->check("pagetype = shop.product_details") ) {
  return "164, 167, 166, 169, 176, 171,";
}

// from here on we know we're not on a product_details page.
if ($vm->check( "category_id = 1,2,3,4,5,6,16,17,18,19,20,27,25,26,28,29,30" ) ) return "184, 164, 167, 166, 169, 171,";

if ($vm->check( "category_id = 35,36,37,38" ) ) return "185";

if ($vm->check( "category_id = 22,23,24,21,32,33" ) ) return "183";



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

Re: Browse vs flypage dynamics

Great Stephen, again, best support ever!

For people who are in similar situations, this might also help:

http://www.metamodpro.com/forums/topic?id=412

Tormodnor
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11527
Newest User:
david9684
Members Online:
2
Guests Online:
174


Forum Legend:

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