Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Category Filter Virtuemart
Category Filter Virtuemart
Category Filter Virtuemart
Hi
I have read the post about updating Chameleon and Metamod to the latest versions which I have done but the module is not firing when checking if "pagetype = category" it only fires if "category_id" is only checked and as mentioned that shows on both category page and product page.
MetaMod v3.15, 2013-11-30
MetaMod Pro plugin v3.15, 2013-11-30 is installed and enabled.
JomGenius v18 is provided by Chameleon / Chameleon Pro
Could not see the version No in Chameleon but the zip was:
Chameleon2-36.zip
Joomla:
Joomla! 2.5.16
Virtuemart:
2.0.24
The code I am trying (not working outputs nothing):
$vm = JomGenius("virtuemart");
if ( $vm->check("pagetype = category") ) {
$category_id = $vm->info( "category_id" );
if ($category_id == "34") echo "Yohere";
}
The code that works (outputs 'Yohere'):
$vm = JomGenius("virtuemart");
$category_id = $vm->info( "category_id" );
if ($category_id == "34") echo "Yohere";
Thank you
Steve
12-Dec-13 01:41:11
Re: Category Filter Virtuemart
Hi
I do hate re-posting but I need to get some tracking happening for a client and require this method to work.
Could someone please advise what I need to do to show only on the category page and not the product details page.
Thank you
Steve
Re: Category Filter Virtuemart
I found this post using the code to define "pagetype"
$vm = JomGenius("virtuemart");
echo "Page type is: " . $vm->info("pagetype") . "<br>";
The result I get is "Page type is: searchresults"
I am linking to the Virtuemart categories from a Joomla menu and all the links/categories display the same result "searchresults".
Once I click on a product from the category page the result I get is "Page type is: productdetails"
Steve
Re: Category Filter Virtuemart
Hi Steve,
sorry I didn't get back to you sooner. The latest version of MetaMod (3.15) should have fixed the problem, HOWEVER when you have Chameleon installed, Chameleon's version of the library overrides MetaMod's one. And Chameleon's version is lagging slightly behind the MetaMod one... and doesn't have that fix yet.
Until I release the update (Chameleon 2.37), here's a simple fix for you:
- find this file in MetaMod: /modules/mod_metamod/jomgenius/virtuemart.php
- take a copy of that file, and copy it to overwrite Chameleon's version, found at: /components/com_chameleon/jomgenius/virtuemart.php
That should fix the problem.
Sorry for the inconvenience.
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Category Filter Virtuemart
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5965
- Posts this week:
- 4
- User Info:
- Total Users:
- 8011
- Newest User:
- ignac84502
- Members Online:
- 0
- Guests Online:
- 98
- 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