Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCart: Add categories to main menu?

Tags:

php

menu

opencart

I've just installed OpenCart for the first time, deleted all the dummy products and categories it comes with and added my own. However, now nothing appears in my menu - no product categories. I can't seem to fine where to add items to menus.

Can anyone point me in the right direction? Thanks

UPDATE:

THis is the php in my header tpl file:

?php if ($categories) { ?>
<div id="menu">
  <ul>
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
      <?php if ($category['children']) { ?>
      <div>
        <?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 } ?>
  </ul>
</div>

I have not acutally changed any of it from the original

like image 340
MeltingDog Avatar asked Jul 09 '12 03:07

MeltingDog


People also ask

How do I add a category and subcategory?

In the Enter new item field, enter the new category or the subcategory name. Click Add. The new category or subcategory is added under the Selected list.

How do I change the navigation menu in OpenCart?

To change the categories, please log in to the Opencart admin then go to Catalog >> Categories where you will see lists of categories. You can edit the existing top-level categories or add the new categories. Then in the data tab, you will see a Top checkbox field where you can check to show in the main menu.

What means sub category?

Definition of subcategory : a category that is a subdivision of a larger category : a secondary category grouping the books into the appropriate categories and subcategories A new subcategory of vodkas, which provide a contrast to the "tasteless" aspect of this spirit, are the flavored vodkas …—


1 Answers

Create a new parent category and sub categories in Catalog->Category->insert then add the new product Catalog->product->insert. Product should be appear in frond end. for more details see this video tutorials : http://www.opencart.com/index.php?route=documentation/screencast

like image 93
Sathishkumar Avatar answered Nov 03 '22 20:11

Sathishkumar