Jump to content

How to highlight current manufacturer in module blockmanufacturers?


Recommended Posts

  • 7 months later...

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

  • 4 years later...

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...