Jump to content

(Help) get all the manufacturers in the current category


dhada

Recommended Posts

How can i get all the manufacturers base on the current category? Thanks.

 

I already add this code but all the manufacturers showing.

 

CategoryController.php

 self::$smarty->assign(array(
  'allow_oosp' => (int)(Configuration::get('PS_ORDER_OUT_OF_STOCK')),
  'comparator_max_item' => (int)(Configuration::get('PS_COMPARATOR_MAX_ITEM')),
  'suppliers' => Supplier::getSuppliers(),
  'manufacturers' => Manufacturer::getManufacturers()
 ));

 

category.tpl

 {if isset($manufacturers)}
 <div id="manufacturers">
  <h3>{l s='Brands'}</h3>
  <ul class="inline_list">
  {foreach from=$manufacturers item=manufacturer}
<li>
 <a href="{$link->getManufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$manufacturer.name|escape:'htmlall':'UTF-8'}">
{$manufacturer.name|escape:'htmlall':'UTF-8'}
 </a>
</li>
  {/foreach}
  </ul>
  <br class="clear"/>
 </div>
 {/if}

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