VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: bartlo on May 04, 2013, 23:31:09 PM

Title: Display some Joomla module when one Category of product is choosen
Post by: bartlo on May 04, 2013, 23:31:09 PM
Hello

Sorry for silly question

How to configure ( hope we can) to show on page some Joomla module only when
1) one product is choosen ( not added to basket - only view)
2) is choosen product form one category

Thanks in advance
Regards
Bartek
Title: Re: Display some Joomla module when one Category of product is choosen
Post by: K&K media production on May 04, 2013, 23:59:56 PM
you can try to make a blind menu to the product and assign the module to this menu item
Title: Re: Display some Joomla module when one Category of product is choosen
Post by: PRO on May 05, 2013, 02:38:45 AM
http://www.metamodpro.com/metamod/metamod-pro

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

Create a module position for each product page Creates a module position called productdetails# with # being the current product id.
<?php if (JRequest::getVar('view')=='productdetails') { ?>
<div id="productmod"><jdoc:include type="modules" name="productdetails<?php echo JRequest::getInt('virtuemart_product_id',0); ?>" /></div>
<?php } ?>

Title: Re: Display some Joomla module when one Category of product is choosen
Post by: ahmadjan on August 26, 2013, 17:57:15 PM
Quote from: PRO on May 05, 2013, 02:38:45 AM
http://www.metamodpro.com/metamod/metamod-pro

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

Create a module position for each product page Creates a module position called productdetails# with # being the current product id.
<?php if (JRequest::getVar('view')=='productdetails') { ?>
<div id="productmod"><jdoc:include type="modules" name="productdetails<?php echo JRequest::getInt('virtuemart_product_id',0); ?>" /></div>
<?php } ?>

Respected PRO | Global Moderator.

As you have mentioned this URL ( http://www.kaizenmediaworks.com/virtuemart-template-and-module-control ) I followed the instructions from this URL. Few examples are working perfect!
Working Examples Headings.
Quote
1-Create a module position for all product pages
2-Modules on Virtuemart Category Pages Create a module position for all categories
3-Many other views You can do the same with any vmart view. Cart, account maintenance, etc

But When I try any Example where this code came
<div id="productmod"><jdoc:include type="modules" name="productdetails<?php echo JRequest::getInt('virtuemart_product_id',0); ?>" /></div>
and this
Quote<div id="catmod"><jdoc:include type="modules" name="category<?php echo JRequest::getInt('virtuemart_category_id',0); ?>" /></div>
This never work for me..
Is it possible for you to elaborate this line ?
QuoteCreate a module position for each product page Creates a module position called productdetails# with # being the current product id.

I have tried this example with changing the id 0 to my VM Product id. but fails..
Please help.

Using VM 2.0.22a

Best Regards.
Title: Re: Display some Joomla module when one Category of product is choosen
Post by: Maxim Pishnyak on August 28, 2013, 21:24:42 PM
Quote from: ahmadjan on August 26, 2013, 17:57:15 PM
I followed the instructions from this URL.
What specific instructions did you follow?
Quote from: ahmadjan on August 26, 2013, 17:57:15 PM
But When I try any Example where this code came ...
....
This never work for me..
How did you try? What specific steps did you do?