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 not working on vm flypage.

MetaMod not working on vm flypage.

We want one of our modules to display only on the flypage but not on other vm pages.
So we installed metamod and inserted this code :

Code:

$vm = JomGenius("virtuemart"); // need this at the start of every rule

if ($vm->check( "pagetype = shop.product_details" ) ) {

  $product_id = $vm->info( "product_id" );

  /* modules that should appear for specific products */
  if ($product_id == "31") return 74;

}

74 is our module id which is currently disabled, we just need it to work.

Edited By: abhilash88
11-Jul-11 14:42:26

abhilash88
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: MetaMod not working on vm flypage.

Anyone got an idea ?

abhilash88
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: MetaMod not working on vm flypage.

Ok tried testing MetaMod by placing this,

Code:

if ($option == "com_virtuemart") {

$page = JRequest::getVar("page");
$product_id = JRequest::getVar("product_id");

/* PRODUCT DETAILS page */
if ($page == "shop.product_details") {
  /* modules that should appear for specific products */
  if ($product_id == "31") return 74;
}
}

Tested the above code, just to make sure, if MetaMod is working or not.

But its not even working and the whole site gone blank.

So, this is not working!!!

abhilash88
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: MetaMod not working on vm flypage.

Hi abhilash88,

if the whole site is going blank, that can be a result of having bad PHP code in the PHP box, depending on how your web hosting is set up.

I tried the code you have above -- it's fine, so if you copy and paste that exact code into the PHP box then MetaMod should not be causing an error.

Here are some things to try:

1 - do you get the same blank screen if you delete all the PHP code from the box and save the MetaMod?
2 - do you get the same blank screen if you unpublish the MetaMod?
3 - does module id 74 definitely exist? What happens if you include a different module id?
4 - have you definitely disabled module id 74 so that it won't show up unless MetaMod includes it? e.g. unpublish it, or set it to "none" menu items. It's possible that Joomla is trying to publish it on the page twice, and some modules don't like that, so it may cause the error
5 - try turning on the system debug plugin, and setting the error reporting in the global configuration in Joomla to "maximum". This may give some more information about the error that's occurring.


Hope one of those helps,
Stephen Brandon

p.s. can you please include your version of MetaMod and Joomla.

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

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11515
Newest User:
velis415
Members Online:
0
Guests Online:
199

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