VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: El_Loboo on March 29, 2013, 18:33:17 PM

Title: [ SOLVED ] Get category id of VM
Post by: El_Loboo on March 29, 2013, 18:33:17 PM
Hi

I published the products VM module so that customers can see the best selling items in each category. I would like to put a different background image in depending of VM category.

I have been testing in modules\mod_virtuemart_product\tmpl\default.php file but i can“t get the category id of VM to concatenate with the class 'vmproduct'. Something like this:

<ul class="vmproduct<?php echo $category->virtuemart_category_id?>">

but not works... $category->virtuemart_category_id is empty.

Anybody can help me?

Regards
Title: Re: Get category id of VM
Post by: PRO on March 29, 2013, 21:21:35 PM
http://forum.virtuemart.net/index.php?topic=94044.0
Title: Re: Get category id of VM
Post by: El_Loboo on March 30, 2013, 21:37:50 PM
Thank you PRO.

Finally concatenated module ID by the following way:

<div class="vmgroup<?php echo $params->get( 'moduleclass_sfx' ) . $module->id; ?>">

Regards.
Title: Re: Get category id of VM
Post by: PRO on March 31, 2013, 00:58:29 AM
i thought u wanted the category id
Title: Re: Get category id of VM
Post by: El_Loboo on April 02, 2013, 17:01:23 PM
Yes PRO, but then I thought to use different modules for each category and finally I did it that way.

Your reply was very useful, i'm glad you.

Regards.
Title: Re: Get category id of VM
Post by: PRO on April 02, 2013, 17:58:06 PM
Quote from: El_Loboo on April 02, 2013, 17:01:23 PM
Yes PRO, but then I thought to use different modules for each category and finally I did it that way.

Your reply was very useful, i'm glad you.

Regards.

http://www.kaizenmediaworks.com/virtuemart-template-and-module-control