// Added images to blockmanufacturers
This commit is contained in:
@@ -59,13 +59,23 @@ class BlockManufacturer extends Module
|
||||
public function hookLeftColumn($params)
|
||||
{
|
||||
if (!$this->isCached('blockmanufacturer.tpl', $this->getCacheId()))
|
||||
{
|
||||
$manufacturers = Manufacturer::getManufacturers();
|
||||
foreach ($manufacturers as &$manufacturer)
|
||||
{
|
||||
$manufacturer['image'] = $this->context->language->iso_code.'-default';
|
||||
if (file_exists(_PS_MANU_IMG_DIR_.$manufacturer['id_manufacturer'].'-'.ImageType::getFormatedName('medium').'.jpg'))
|
||||
$manufacturer['image'] = $manufacturer['id_manufacturer'];
|
||||
}
|
||||
|
||||
$this->smarty->assign(array(
|
||||
'manufacturers' => Manufacturer::getManufacturers(),
|
||||
'manufacturers' => $manufacturers,
|
||||
'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'),
|
||||
'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'),
|
||||
'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'),
|
||||
'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'),
|
||||
));
|
||||
}
|
||||
return $this->display(__FILE__, 'blockmanufacturer.tpl', $this->getCacheId());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user