Post by scud1096 » Mon Oct 17, 2011 5:14 am

Is there anyway to replace the categories menu on the top to a custom menu that links to pages and a forum and then have the categories listed at the left? i looked for a module but couldnt find one. thanks for any help

New member

Posts

Joined
Mon Oct 10, 2011 10:04 am

Post by colt1911 » Mon Oct 17, 2011 5:50 am

You can go into the admin panel to Categories, and for each you don't want to be in top menu: 1. click on your category name 2. under Data, make sure the "Top" checkbox is not selected -- this box controls what appears in the top menu.

Then, go to catalog/view/theme/default/template/common/header.tpl and change your menu items (toward the bottom) to links in regular list (<li></li>) items as you would a regular web page.

New member

Posts

Joined
Sat Sep 24, 2011 1:23 am

Post by colt1911 » Mon Oct 17, 2011 5:56 am

This is what I mean about header.tpl:

Find this code:

Code: Select all

<?php for ($i = 0; $i < count($category['children']);) { ?>
        <ul>
          <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
          <?php for (; $i < $j; $i++) { ?>
          <?php if (isset($category['children'][$i])) { ?>
          <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
          <?php } ?>
          <?php } ?>
        </ul>
        <?php } ?>
      </div>
      <?php } ?>
    </li>
    <?php } ?>
    <li><a href="/store/index.php?route=information/information&information_id=7">About</a></li>
    <li><a href="/store/index.php?route=information/information&information_id=8">Our Friends</a></li>
    <li><a href="/store/index.php?route=information/contact">Contact Us</a></li>
  </ul>
</div> <!-- END MENU -->
Notice the three list items at the end: They are what I added to customize the menu to take me to non-category pages.

New member

Posts

Joined
Sat Sep 24, 2011 1:23 am

Post by scud1096 » Mon Oct 17, 2011 7:34 am

i lost my whole menu, trying to get the categories to show back up on the top still

New member

Posts

Joined
Mon Oct 10, 2011 10:04 am

Post by webfunk » Sat Mar 31, 2012 1:06 pm

Thanks very much to those who provided an answer to this thread. It was driving me crazy because I couldn't find a module for it when I deleted the default cateories OpenCart puts there. I reinstalled OpenCart several times before finally coming across this thread.

Like someone else said...if you lose your top menu, make sure when you are inputting categories to go into the category, click on the 'data' tab, and select 'top menu'. Obviously only do this for categories you want on that top menu.

Thanks again!

Newbie

Posts

Joined
Wed Feb 29, 2012 4:11 pm
Who is online

Users browsing this forum: No registered users and 37 guests