hello,
To avoid losing each update virtuemart , the solution to bring up the logos of manufacturers via the link
www.flexiblewebdesign.com/forum-virtuemart-2-template-puremart-support/250-tutorial-how-to-show-manufacturer-logos#1001
I found on the forum virtuemart a solution put in the files lightmart :
in /templates/flexible_lightmart/html/com_virtuemart/category/default:
search lign 306:
<?php if ($params->get('category_list_manufac',1)) { ?>
<?php
if (empty($product->mf_images[0]->file_url_thumb)) {
echo ""; // leave here empty so nothing will be visible
} else { ?>
<?php
$ManufacturerLink = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $product->virtuemart_manufacturer_id . '&tmpl=component');
$ManufacturerName = $product->mf_name;
?>
<div class="FlexibleProductDetailsManufacturerLogoList"> <a title="<?php echo $ManufacturerName; ?>" rev="iframe|550|650" rel="facebox" href="<?php echo $ManufacturerLink ?>"><img src="<?php echo $product->mf_images[0]->file_url_thumb; ?>" alt="<?php echo $ManufacturerName; ?>" /></a> </div>
<?php } ?>
<?php } ?>
replace by:
<?php if ($params->get('category_list_manufac',1)) { ?>
<?php
// get manufacturer models
$model = VmModel::getModel('manufacturer');
if ($product->virtuemart_manufacturer_id !=0 ) {
$manufacturer = $model->getManufacturer();
$model->addImages($manufacturer,1);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"',false);
}
//if (empty($product->mf_images[0]->file_url_thumb)) {
if ($product->virtuemart_manufacturer_id ==0 ) {
echo ""; // leave here empty so nothing will be visible
} else { ?>
<?php
$ManufacturerLink = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $product->virtuemart_manufacturer_id . '&tmpl=component');
$ManufacturerName = $product->mf_name;
?>
<div class="FlexibleProductDetailsManufacturerLogoList"> <a title="<?php echo $ManufacturerName; ?>" rev="iframe|550|650" rel="facebox" href="<?php echo $ManufacturerLink ?>"><?php echo $manufacturerImage;//$product->mf_images[0]->file_url_thumb; ?></a> </div>
<?php } ?>
<?php } ?>
I do the same for
if ($ params-> get ('category_grid_manufac', 1))
if ($ params-> get ('category_multi_manufac', 1))
And in /templates/flexible_lightmart/html/com_virtuemart/productdetails/default.php
ligne 404
<?php if ($params->get('productdetails_manufacturer',1)) { ?>
<?php
if (empty($this->product->mf_images[0]->file_url_thumb)) {
echo ""; // leave here empty so nothing will be visible
} else { ?><?php
$ManufacturerLink = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id . '&tmpl=component');
$ManufacturerName = $this->product->mf_name;
?>
<div class="FlexibleProductDetailsManufacturerLogoList">
<a title="<?php echo $ManufacturerName; ?>" rev="iframe|550|650" rel="facebox" href="<?php echo $ManufacturerLink ?>"><img src="<?php echo $this->product->mf_images[0]->file_url_thumb; ?>" alt="<?php echo $ManufacturerName; ?>" /></a>
</div>
<?php } ?>
<?php } ?>
replace by:
<?php if ($params->get('productdetails_manufacturer',1)) { ?>
<?php
// get manufacturer models
JRequest::setVar('virtuemart_manufacturer_id',$this->product->virtuemart_manufacturer_id,'GET');
$model = VmModel::getModel('manufacturer');
if ($this->product->virtuemart_manufacturer_id !=0 ) {
$manufacturer = $model->getManufacturer();
$model->addImages($manufacturer,1);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"',false);
}
//if (empty($this->product->mf_images[0]->file_url_thumb)) {
if ($this->product->virtuemart_manufacturer_id ==0 ) {
echo ""; // leave here empty so nothing will be visible
} else { ?>
<?php
$ManufacturerLink = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id . '&tmpl=component');
$ManufacturerName = $this->product->mf_name;
?>
<div class="FlexibleProductDetailsManufacturerLogoList"> <a title="<?php echo $ManufacturerName; ?>" rev="iframe|550|650" rel="facebox" href="<?php echo $ManufacturerLink ?>"><?php echo $manufacturerImage;//$product->mf_images[0]->file_url_thumb; ?></a> </div>
<?php } ?>
<?php } ?>
Is this is correct, for the developer of lightmart?
Regards,
philippet