show manufacturer logo in product details

WebIm
22 Posts
WebIm posted this 3 weeks ago

I want to show the product manufacturer logo with link to manufacturer products in my product details in virtuemart can you help me ?

I want to show the product manufacturer logo with link to manufacturer products in my product details in virtuemart can you help me ?
Vote to pay developers attention to this features or issue.
9 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 3 weeks ago

Hello,

Themler supports only showing Manufacturer name on product details page. You can try adding this code to Product Details page via Insert -> CMS Code > Edit CMS Code:

<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=0&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id[0], false); ?>"><?php echo $manufacturer->images[0]->displayMediaThumb(false,false);?></a>

Gina
Themler Support

Hello, Themler supports only showing Manufacturer name on product details page. You can try adding this code to Product Details page via Insert -> CMS Code > Edit CMS Code: <a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=0&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id[0], false); ?>"><?php echo $manufacturer->images[0]->displayMediaThumb(false,false);?></a> Gina Themler Support
WebIm
22 Posts
WebIm posted this 3 weeks ago

Hello
Thank you for your answer.
I used the CMS code control and I entered the code
however i get this error.
0 - Call to a member function displayMediaThumb() on null

How can I solve?
thank you very much

tks.
daniela

Hello Thank you for your answer. I used the CMS code control and I entered the code however i get this error. **0 - Call to a member function displayMediaThumb() on null** How can I solve? thank you very much tks. daniela
Support Team
Support Team posted this 2 weeks ago

Could you please try editing VM file directly as suggested here https://www.media-division.com/virtuemart-show-manufacturer-logo-in-product-details/

GIna
Themler support

Could you please try editing VM file directly as suggested here https://www.media-division.com/virtuemart-show-manufacturer-logo-in-product-details/ GIna Themler support
WebIm
22 Posts
WebIm posted this 2 weeks ago

Thank you for your answer.
I tried the procedure described in the link that he pointed out to me; however it refers to version 1.1.3 and 1.1.4. and it doesn't work.

Do you have any other suggestions?
tks
daniela

Thank you for your answer. I tried the procedure described in the link that he pointed out to me; however it refers to version 1.1.3 and 1.1.4. and it doesn't work. Do you have any other suggestions? tks daniela
Support Team
Support Team posted this 2 weeks ago

Add this code to CMS Code control:

<?php if(!empty($product->virtuemart_manufacturer_id))
{
    $model = VmModel::getModel('manufacturer');

    foreach($product->virtuemart_manufacturer_id as $manufacturer_id)
    {
        $model->setId($manufacturer_id);
        $manufacturer = $model->getManufacturer();
        $model->addImages($manufacturer);

        $thumbnail_image = $manufacturer->images[0]->displayMediaThumb('class="mfg-thumbnail-image"', false);


    }
} ?>

<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=0&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id[0], false); ?>"><?php echo $manufacturer->images[0]->displayMediaThumb(false,false);?></a>

It works on my end:

Screenshot-1.png

But as you can see I have also added Manufacturer's Name control. You can try without it first.

Gina

Add this code to CMS Code control: <?php if(!empty($product->virtuemart_manufacturer_id)) { $model = VmModel::getModel('manufacturer'); foreach($product->virtuemart_manufacturer_id as $manufacturer_id) { $model->setId($manufacturer_id); $manufacturer = $model->getManufacturer(); $model->addImages($manufacturer); $thumbnail_image = $manufacturer->images[0]->displayMediaThumb('class="mfg-thumbnail-image"', false); } } ?> <a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=0&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id[0], false); ?>"><?php echo $manufacturer->images[0]->displayMediaThumb(false,false);?></a> It works on my end: !Screenshot-1.png! But as you can see I have also added Manufacturer's Name control. You can try without it first. Gina
WebIm
22 Posts
WebIm posted this 2 weeks ago

Thanks.
The code works. However it is necessary to add the instruction if the producer is not inserted as the error "0 - Call to a member function displayMediaThumb() on null" it is generated if the manufacturer is not indicated for the product.

many thanks for your support
Daniela

Thanks. **The code works.** However it is necessary to add the instruction if the producer is not inserted as the error "**0 - Call to a member function displayMediaThumb() on null**" it is generated if the manufacturer is not indicated for the product. many thanks for your support Daniela
Support Team
Support Team posted this 2 weeks ago

Sorry, I haven't tested this code without a manufacturer.

Gina
Themler Support

Sorry, I haven't tested this code without a manufacturer. Gina Themler Support
WebIm
22 Posts
WebIm posted this 2 weeks ago

Hi Gina. Thanks for your patience and support.
Did you take a look at the code?
Regards
Daniela

Hi Gina. Thanks for your patience and support. Did you take a look at the code? Regards Daniela
Support Team
Support Team posted this 2 weeks ago

I had to assign this to the developers to adjust the code and avoid the error for products without manufacturers. Still waiting for the reply.
If this error is a PHP Warning or Notice (not ERROR), you can disable php warning on Joomla frontend, at least for now.

Gina
Themler Support

I had to assign this to the developers to adjust the code and avoid the error for products without manufacturers. Still waiting for the reply. If this error is a PHP Warning or Notice (not ERROR), you can disable php warning on Joomla frontend, at least for now. Gina Themler Support
You must log in or register to leave comments