Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » MetaMod not working on vm flypage.
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.
11-Jul-11 15:42:26
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!!!
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.
- Index
- » MetaMod
- » MetaMod General Support
- » MetaMod not working on vm flypage.
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7622
- Newest User:
- boestreecare
- Members Online:
- 2
- Guests Online:
- 142
- Online:
- boestreecare, musser4585
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked