tmk Posted October 1, 2014 Share Posted October 1, 2014 (edited) 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 October 1, 2014 by tmk (see edit history) Link to comment Share on other sites More sharing options...
tmk Posted October 1, 2014 Author Share Posted October 1, 2014 Of course it is working when I hardcode: <img src="mysite.com/img/m ... but it is not a solution. Link to comment Share on other sites More sharing options...
tmk Posted October 1, 2014 Author Share Posted October 1, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now