babu_babu Posted October 21, 2011 Share Posted October 21, 2011 I'm looking for a way to highlight the current manufacturer in module "blockmanufacturers"? I mainly don't know how to get the ID and name of the current manufacturer. Thanks. Link to comment Share on other sites More sharing options...
originaliko Posted May 23, 2012 Share Posted May 23, 2012 Hi, I had the same problem so here it goes : In the hookLeftColumn function in modules/blockmanufacturer/blockmanufacturer.php $id_manufacturer = (int)Tools::getValue('id_manufacturer'); //ADD THIS $smarty->assign(array( 'manufacturers' => Manufacturer::getManufacturers(), 'manufacturer_id'=> $id_manufacturer, // AND THIS 'link' => $link, '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'), )); Then you can use something like this in modules/blockmanufacturer/blockmanufacturer.tpl {foreach ....} .... class="{if $manufacturer.id_manufacturer == $manufacturer_id}current{/if}" .... {/foreach} Link to comment Share on other sites More sharing options...
jcuenin Posted February 7, 2017 Share Posted February 7, 2017 Hi, I just wanted to say thank you as I was looking for a way to do the same! 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