Dear, I need to integrate product Manufacturer in Product Details page with link and image / logo like the Category description short code:
<?php echo $this->category->category_description ; ?>
Can someone help me?
To display manufacturer image:
$mfModel= VmModel::getModel('Manufacturer');
$manufacturer = $mfModel->getManufacturer($this->product->virtuemart_manufacturer_id[0]);
$mfModel->addImages($manufacturer);
echo $manufacturer->images[0]->displayMediaThumb(false,false);
Thank you! Working fine, can I link the image with the Manufacturer`s products? How must be the link looking?
Image wrapped with link to manufacturer's products:
<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>
Thank you, working very good for me!
Do you know how can I make with Custom CMS code to show the second image of the product?
The second image is accessed with $this->product->images[1]: echo $this->product->images[1]->displayMediaThumb(); //or displayMediaFull()
.
But you should add a check to check if it exists. And should do the same with manufacturer, to avoid errors in case manufacturer is not set.
Can you please assist me, to generate the full code to have 1st image / 2nd image and hover, when I roll over the image to show the second image?