i am trying to check whether module1 is called in virtue mart default page.
if module1 is being called i want to show product description for that module. when i tried to add description in default page it shows description in all virtue mart products modules.
i am stuck at this stage of my project where i am not able to catch module1 call in virtue mart page.
how can i check for this module1 call?
here is code for description:
// Product Description
if (!empty($this->product->product_desc)) {
?>
<div class="product-description">
<?php /** @todo Test if content plugins modify the product description */ ?>
<span class="title"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE') ?></span>
<?php echo $this->product->product_desc; ?>
</div>
<?php
}
Go to ../modules/mod_virtuemart_product/tmpl/default.php
This file copy to create new file in this you add or remove code. And after go to administrator select or create module. then select layout drop down at right side of screen your new created file.
it's working.
By default joomla could check if a module exist in a specific position.
So if you add your module in a position that doesn't have any other modules you could use:
<?php if ($this->countModules( 'user1' )) : ?>
Module exist
<?php endif; ?>
You could check here the complete documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With