Good evening,
in the file "category / default.php" I entered the following code, but I can not make the producer's image look. You can help me?
<?php if ($this->categoryId !== '0') {
$model = VmModel::getModel('Manufacturer');
$manufacturers = $model->getManufacturers(true, true,true);
foreach ($manufacturers as $manufacturer) {
if ($manufacturer->mf_name == $this->category->category_name ) {
echo '<h1>' . $manufacturer->mf_desc . '</h1>';
// echo '<h1>' .$manufacturer->virtuemart_media_id. '</h1>';
}
}
} ?>
Thank
Virtuemart 3.2.14
Joomla 3.8.7
PHP 5.6.36
Your code is strange, you want display all manufacturers in shop ?
But to add images, based from your code
<?php
$model = VmModel::getModel('Manufacturer');
$manufacturers = $model->getManufacturers(true, true,true);
// add the images to manufacturers
$model->addImages($manufacturers ,1);// 1 to only add 1 image per manufacturer
foreach ($manufacturers as $manufacturer) {
if ($manufacturer->mf_name == $this->category->category_name ) {
echo '<h1>' . $manufacturer->mf_desc . '</h1>';
// echo '<h1>' .$manufacturer->virtuemart_media_id. '</h1>';
}
}
?>