News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Manufacturer Image in Category display

Started by Darko F., August 01, 2024, 18:10:00 PM

Previous topic - Next topic

Darko F.

Hi all
I need some advice here, I try to add manufacturer picture in /category/myowerride.php

This is default code add description fine

<?php }
if(!empty($this->manu_descr)) {
?>

        <div class="manufacturer-description">
<?php echo $this->manu_descr?>
        </div>
<?php }
}

So I try to add image  with:

<?php // Manufacturer Image
if (!empty($this->manufacturerImage)) { ?>

<div class="manufacturer-image">
<?php echo $manufacturerImage;?>
</div>
<?php ?>

Unfortunately it didn't work. Can anyone advice some solution?
There in no problem if you fall. Problem is if you don't get up

Milbo

I just see that the category view loads only the name, not more.

The code in the view.html.php is currently just
$metaObj = VmModel::getModel('manufacturer')->getManufacturer($this->virtuemart_manufacturer_id);
$this->manufacturer = $metaObj;

I replace it against

$metaObj = VmModel::getModel('manufacturer')->getManufacturer($this->virtuemart_manufacturer_id);
$this->manufacturer = $metaObj;
$categoryModel->addImages($this->manufacturer,$catImgAmount);
$this->manu_descr = $metaObj->mf_desc;

so with the new core, you can then display it with
echo $this->manufacturer->images[0]->displayMediaThumb('', false);
or so
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Darko F.

Great.
Thank you I can confirm is worked.
Will these core changes be added in future updates or I need to make override?
There in no problem if you fall. Problem is if you don't get up