After searching and searching, I FINALLY found a solution to putting my list of manufacturers in the top navigation as a dropdown list. It was a free VQmod (code below) and it is wonderful. I would like to however tweak the code a bit, but don't know what to change and I was hoping someone here could help!
I am using Opencart version 1.5.1.3
Default Template (with modifications)
The change I would like to make is:
I would like to only list 10 of my manufacturers in the dropdown list (not the first 10 in the list, but 10 specific brands that are top sellers) and have the last item be a link called "See All..." that leads to the page that shows all Manufacturers in an Alphabetical List (Find Your Favorite Brand)... (I tried using a negative sort order in admin, but that doesn't hide them from the list, nor does a very high number put a link at the end of the list - probably because they are coded to be listed in alphabetical order.)
For now, I put the "See All" link at the end, but I don't understand how the coding works so I don't know what to change in order to make my "See All" link show up right after the last Manufacturer link in the list. Also, please note that I changed the Manufacturer/Brand heading to say "Designers"
The VQmod code that added my manufacturers list to the top navigation is here:
Code: Select all
<modification>
<id>Manufacturer In Top Menu</id>
<version>1.5.1.2</version>
<vqmver>2.0</vqmver>
<author>jimmy phong</author>
<file name="catalog/controller/common/header.php">
<operation>
<search position="before">
<![CDATA[if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {]]>
</search>
<add>
<![CDATA[//load manufacturer
$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
$this->data['href_manufacturer'] = $this->url->link('product/manufacturer');
$data = array();
$this->load->model('catalog/manufacturer');
$this->data['manufacturer'] = array();
$manufacturers = $this->model_catalog_manufacturer->getManufacturers($data);
if($manufacturers){
foreach($manufacturers as $manufacturer){
$this->data['manufacturer'][] = array(
'name' => $manufacturer['name'],
'href' => $this->url->link('product/manufacturer/product', 'manufacturer_id='.$manufacturer['manufacturer_id'])
);
}}]]>
</add>
</operation>
</file>
<file name="catalog/view/theme/default/template/common/header.tpl">
<operation error="skip">
<search position="after">
<![CDATA[
<li><?php echo( '<a href="http://www.mysite.com/index.php?route=product/latest">WHAT'S NEW</a>' ); ?></li>
]]>
</search>
<add>
<![CDATA[
<li>
<a href="<?php echo $href_manufacturer; ?>"><?php echo $text_manufacturer; ?></a>
<div>
<?php for ($i = 0; $i < count($manufacturer);) { ?>
<ul>
<?php $j = $i + ceil(count($manufacturer) / 4); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($manufacturer[$i])) { ?>
<li><a href="<?php echo $manufacturer[$i]['href']; ?>"><?php echo $manufacturer[$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<ul>
<li><?php echo( '<a href="http://www.mysite.com/index.php?route=product/manufacturer">SEE ALL</a>' ); ?></li>
</ul>
</div>
</li>
]]>
</add>
</operation>
</file>
<file name="catalog/language/english/common/header.php">
<operation>
<search position="after">
<![CDATA[
// Text
]]>
</search>
<add>
<![CDATA[
$_['text_manufacturer'] = 'Designers';
]]>
</add>
</operation>
</file>
</modification>

Thank you in advance for your help!