Answer the question
In order to leave comments, you need to log in
How to add an additional parameter to the Joomla mod_virtuemart_manufacturer module?
Hello. Joomla has a standard mod_virtuemart_manufacturer module that is responsible for displaying manufacturers. But this module has one drawback - it cannot edit the number of manufacturers that I would like to display.
What I have already done:
1. Added variables to the mod_virtuemart_manufacturer.xml file
<param name="manufacturers_per_line" type="text" default=""
label="MOD_VIRTUEMART_MANUFACTURER_LINE"
description="MOD_VIRTUEMART_MANUFACTURER_LINE_DESC" />
$manufacturers_per_line = $params->get( 'manufacturers_per_line', 5); // Display 5 manufactureres in Line
<ul class="vmmanufacturer<?php echo $params->get('moduleclass_sfx'); ?>">
<?php
foreach ($manufacturers as $manufacturer) {
$link = JROUTE::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);
?>
<li><a href="<?php echo $link; ?>">
<?php
if ($manufacturer->images && ($show == 'image' or $show == 'all' )) { ?>
<?php echo $manufacturer->images[0]->displayMediaThumb('',false);?>
<?php
}
if ($show == 'text' or $show == 'all' ) { ?>
<div><?php echo $manufacturer->mf_name; ?></div>
<?php
}
?>
</a>
</li>
<?php
if ($col == $manufacturers_per_row && $manufacturers_per_row && $last) {
echo '</ul><ul class="vmmanufacturer'.$params->get('moduleclass_sfx').'">';
$col= 1 ;
} else {
$col++;
}
$last--;
} ?>
</ul>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question