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.

 

Best way to assign a module to all products of a particular category

Best way to assign a module to all products of a particular category

Hi all

I'm using Joomla 2.5.6 and VM 2.0.20b.

I can´t assign a module to all products of a particular category but not display in category view, only in product details. 

I was trying different codes but none work. I tried:

Code:

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

if (
$option == 'com_virtuemart'
and $view == 'productdetails'
and $category_id == '110'

) return 554;

Debug info:
Module ID: 555
$option: com_virtuemart
$view: productdetails
$id:
$Itemid: 640
$timezone: UTC
$language: es-es
$language_code: es
$language_region: es
Including modules: Ninguno

Or:

Code:

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

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

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

  /* modules that should appear for specific products */
  if ($category_id == "110") return 554;
}

Debug info:
Module ID: 555
$option: com_virtuemart
$view: productdetails
$id:
$Itemid: 640
$timezone: UTC
$language: es-es
$language_code: es
$language_region: es
Including modules: Ninguno

I'm a bit desperate, i've been looking for several days and I can not find the solution.

Regards.

El_LoBooo
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Best way to assign a module to all products of a particular category

I finally managed to find the solution. The problem seemed to be in this line:

Code:

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

must be replaced by this:

Code:

if ( $vm->check("pagetype = productdetails")) { 

It was my fault because seeing looked specifications for the version 1.x

Regards.

El_LoBooo
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Best way to assign a module to all products of a particular category

Yes, that's the one. Sorry that the docs were written for VM1.0. I'll spend some time today writing the equivalent for VM2.0.

Best regards,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5910
Total Posts Today:
1
User Info:
 
Total Users:
10152
Newest User:
kasautiizindagiikay
Members Online:
0
Guests Online:
310

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