Jump to content

How to get proper manufacturers image directory name?


Recommended Posts

Hi

I'm trying to list all manufacturers in block top menu as corresponding logo/image, not as a text/name.

 

I modify blocktopmenu.php in makeMenu() function like this:





foreach ($manufacturers as $key => $manufacturer)
$this->_menu .= '<li><a href="'.$link->getManufacturerLink((int)$manufacturer['id_manufacturer'], $manufacturer['link_rewrite']).'" title="'.Tools::safeOutput($manufacturer['name']).'">'.'<img class="img-responsive" src="'.$img_manu_dir.$manufacturer['id_manufacturer'].'-'.ImageType::getFormatedName('medium').'.jpg" />'.'</a></li>'.PHP_EOL;
$this->_menu .= '</ul>';
break;

it generate proper name of file but without relative source to that image like:





<img class="img-responsive" src="1-medium_default.jpg"/>

so the result is question mark image.

 

Any idea why i can't use $img_manu_dir or why it is not working?

Edited by tmk (see edit history)
Link to comment
Share on other sites

I have tried replace $img_manu_dir  with _PS_MANU_IMG_DIR_

It generate proper but physical path to manufacturer image

<img class="img-responsive" src="/home/xxxxx/domains/mydomain.com/public_html/store/img/m/6-medium_default.jpg"/>

so the image doesn't appear of course.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...