diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php index 724ea4da3..a5eb3b3c5 100644 --- a/modules/blocktopmenu/blocktopmenu.php +++ b/modules/blocktopmenu/blocktopmenu.php @@ -221,6 +221,8 @@ class Blocktopmenu extends Module // BEGIN SUPPLIER $this->_html .= ''; + // Option to show all Suppliers + $this->_html .= ''; $suppliers = Supplier::getSuppliers(false, $id_lang); foreach ($suppliers as $supplier) $this->_html .= ''; @@ -228,6 +230,8 @@ class Blocktopmenu extends Module // BEGIN Manufacturer $this->_html .= ''; + // Option to show all Manufacturers + $this->_html .= ''; $manufacturers = Manufacturer::getManufacturers(false, $id_lang); foreach ($manufacturers as $manufacturer) $this->_html .= ''; @@ -472,12 +476,22 @@ class Blocktopmenu extends Module $this->_html .= ''.PHP_EOL; break; + // Case to handle the option to show all Manufacturers + case 'ALLMAN': + $this->_html .= ''.PHP_EOL; + break; + case 'MAN': $manufacturer = new Manufacturer((int)$id, (int)$id_lang); if (Validate::isLoadedObject($manufacturer)) $this->_html .= ''.PHP_EOL; break; + // Case to handle the option to show all Suppliers + case 'ALLSUP': + $this->_html .= ''.PHP_EOL; + break; + case 'SUP': $supplier = new Supplier((int)$id, (int)$id_lang); if (Validate::isLoadedObject($supplier)) @@ -549,6 +563,16 @@ class Blocktopmenu extends Module } break; + // Case to handle the option to show all Manufacturers + case 'ALLMAN': + $link = new Link; + $this->_menu .= '
  • '.$this->l('All manufacturers').'
      '.PHP_EOL; + $manufacturers = Manufacturer::getManufacturers(); + foreach ($manufacturers as $key => $manufacturer) + $this->_menu .= '
    • '.$manufacturer['name'].'
    • '.PHP_EOL; + $this->_menu .= '
    '; + break; + case 'MAN': $selected = ($this->page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : ''; $manufacturer = new Manufacturer((int)$id, (int)$id_lang); @@ -563,6 +587,16 @@ class Blocktopmenu extends Module } break; + // Case to handle the option to show all Suppliers + case 'ALLSUP': + $link = new Link; + $this->_menu .= '
  • '.$this->l('All suppliers').'
      '.PHP_EOL; + $suppliers = Supplier::getSuppliers(); + foreach ($suppliers as $key => $supplier) + $this->_menu .= '
    • '.$supplier['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 +930,4 @@ class Blocktopmenu extends Module } -} \ No newline at end of file +}