Jump to content

Manufacturer detail on manufacturer.tpl


Recommended Posts

Put some code in controllers/front/ManufacturerController.php

Search assignOne function around 90 line.

Replace old method code with following new method code.

 

protected function assignOne()
{
$this->manufacturer->description = Tools::nl2br(trim($this->manufacturer->description));
$nbProducts = $this->manufacturer->getProducts($this->manufacturer->id, null, null, null, $this->orderBy, $this->orderWay, true);
$this->pagination((int)$nbProducts);
$products = $this->manufacturer->getProducts($this->manufacturer->id, $this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay);
$this->addColorsToProductList($products);
$address = $this->manufacturer->getAddresses($this->context->language->id);
  $this->context->smarty->assign(array(
            'nb_products' => $nbProducts,
            'products' => $products,
            'path' => ($this->manufacturer->active ? Tools::safeOutput($this->manufacturer->name) : ''),
            'manufacturer' => $this->manufacturer,
            'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM'),
            'body_classes' => array($this->php_self.'-'.$this->manufacturer->id, $this->php_self.'-'.$this->manufacturer->link_rewrite),
            'address' => $address,
));
}

Now go to the themes\your_current_theme folder and open manufacturer.file in some notepad editor.

 

put following code in where you want to display manufac data.

{if !empty($address)}
<div>
{foreach $address as $add}
          {$add.address1}
           {$add.phone}
           {$add.city}{$add.postcode}
            {$add.phone_mobile}
{/foreach}
</div>
{/if}
Link to comment
Share on other sites

  • 10 months 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...