Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
[solved] Show module only on product category and not product page
[solved] Show module only on product category and not product page
Hello!
I m using Joomla 2.5.8 along with VM 2.0.20b and MetaMod 3.11.
I have 2 VM Product Categories and I also linked them to 2 different Product Category Modules.
I'm trying to show each module(product category list) to show only in related VM category page and not in the VM product page.
This is what I m using at the moment:
$vm = JomGenius("virtuemart");
if ($vm->check("pagetype = category")) return 22;
This could work but its a global rule so I cant define which module to show in a Product Category.
I also tried this:
$vm = JomGenius("virtuemart");
if ($vm->check("category_ids = 10")) return 22;
$vm = JomGenius("virtuemart");
if ($vm->check("category_ids = 11")) return 23;
But this code displays the VM Category modules also in the Product Detail Page.
Any help would appreciated
18-Dec-13 01:47:26
Re: [solved] Show module only on product category and not product page
Hi, sorry for the sloooow response,
It's just a matter of combining the 2 rules:
$vm = JomGenius("virtuemart");
if ($vm->check("category_ids = 10") and $vm->check("pagetype = category")) return 22;
if ($vm->check("category_ids = 11") and $vm->check("pagetype = category")) return 23;
Cheers,
Stephen
Re: [solved] Show module only on product category and not product page
Hallo, i was using this method to display a module on a category.
Everythig was working fine until i updated virtuemart form 2.0.22c to 2.0.24c.
Now it doesn't work anymore, nothing is displayed even if i didn't change anything else: the same categories, the same modules...
The string i was using is:
$vm = JomGenius("virtuemart");
if ($vm->check("category_ids = 3") and $vm->check("pagetype = category")) return 188;
Could you help me please ?
Thanks
Re: [solved] Show module only on product category and not product page
i can add that it works if i only write:
$vm = JomGenius("virtuemart");
if ($vm->check("category_ids = 3")) return 188;
so the problem is only the part:
and $vm->check("pagetype = category")
that is the reason why i use metamod, in order to make the pages of the single products of the category not to show the module 188.
maybe the new virtuemart changed the name of the pagetype ?
I also tried to use 2.0.24b becouse 2.0.24c i think is unofficial, but it's the same..
Thank you so much
Re: [solved] Show module only on product category and not product page
Can you tell me if you have Chameleon installed, or just MetaMod? Chameleon is more likely to be upset by changes in VM than MetaMod is, so that would be useful to know.
Also what exact version of Joomla are you using?
I'll do some checking with the different versions of VM and see if something changed in the category implementation.
Thanks,
Stephen
Re: [solved] Show module only on product category and not product page
Ok, found the issue, a fairly easy one to fix. Will release an update to MetaMod and Chameleon later today to fix it. This will be backwards compatible with older sub-versions of VM too.
Thanks for reporting it,
Stephen
Re: [solved] Show module only on product category and not product page
Just wait for the fix - if you aren't using Chameleon then you don't need it – it's just that the 2 products share the same piece of code and if you're using both then the Chameleon one gets used so you would need the update for that.
I hope to have the new MetaMod available later today. WIll update on here once it's available.
Cheers,
Stephen
Re: [solved] Show module only on product category and not product page
Sooorry it took ages, but I've just uploaded the new versions: the free version is a direct download from http://www.metamodpro.com/metamod/download and for the Pro version you need to log into your account, view your orders, and download from the order page.
Thanks for your patience,
Stephen
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 2
- User Info:
- Total Users:
- 8029
- Newest User:
- jaime00145
- Members Online:
- 1
- Guests Online:
- 203
- Online:
- jaime00145
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked