From 39c8a8fc2d1fb6dbbbe605350b17ee3b86b159bf Mon Sep 17 00:00:00 2001 From: gr4devel Date: Thu, 29 Aug 2013 21:32:10 +0200 Subject: [PATCH] [+] MO : add the option to show all Manufacturer Add the option to show all Manufacturer in blocktopmenu module. --- modules/blocktopmenu/blocktopmenu.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php index 724ea4da3..39558ee6f 100644 --- a/modules/blocktopmenu/blocktopmenu.php +++ b/modules/blocktopmenu/blocktopmenu.php @@ -228,6 +228,8 @@ class Blocktopmenu extends Module // BEGIN Manufacturer $this->_html .= ''; + // Option to show all Manufacturer + $this->_html .= ''; $manufacturers = Manufacturer::getManufacturers(false, $id_lang); foreach ($manufacturers as $manufacturer) $this->_html .= ''; @@ -472,6 +474,11 @@ class Blocktopmenu extends Module $this->_html .= ''.PHP_EOL; break; + // Case to handle the option to show all Manufacturer + case 'ALLMAN': + $this->_html .= ''.PHP_EOL; + break; + case 'MAN': $manufacturer = new Manufacturer((int)$id, (int)$id_lang); if (Validate::isLoadedObject($manufacturer)) @@ -563,6 +570,17 @@ class Blocktopmenu extends Module } break; + // Case to handle the option to show all Manufacturer + case 'ALLMAN': + $this->_menu .= '
  • '.$this->l('All manufacturers').'
      '.PHP_EOL; + $manufacturers = Manufacturer::getManufacturers(); + $link = new Link; + foreach ($manufacturers as $key => $manufacturer) { + $this->_menu .= '
    • '.$manufacturer['name'].'
    • '.PHP_EOL; + } + $this->_menu .= '
    '; + break; + case 'SUP': $selected = ($this->page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : ''; $supplier = new Supplier((int)$id, (int)$id_lang); @@ -896,4 +914,4 @@ class Blocktopmenu extends Module } -} \ No newline at end of file +}