Post by ultraspoon » Thu Feb 07, 2013 7:41 pm

Hi There,

I am using the theme Cartmainia for 1.5. I have noticed that the "Display on top Bar" function does not work. And I would like to have all my main categories running along the top bar. I have looked into the tpl file and this is what is in it.

Code: Select all

<div id="column-left">

<ul id="topnav">
<?php
$this->language->load('module/category');
$heading_title = $this->language->get('heading_title');
?>
    <li><h2><?php echo $heading_title ?></h2>
        <div class="sub">

<?php
$this->load->model('catalog/category');
$this->load->model('catalog/product');
$categories_1 = $this->model_catalog_category->getCategories(0);   
if ($categories_1) {$output = '';}
foreach ($categories_1 as $category_1) {
$output .= '<ul><li>';
$unrewritten  = $this->url->link('product/category', 'path=' . $category_1['category_id']);
$output .= '<h3><a href="'.($unrewritten).'">' . $category_1['name'] . '</a></h3></li>';
$categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);
if ($categories_2) {$output .= '';}
foreach ($categories_2 as $category_2) {
$output .= '<li>';
$sub_unrewritten = $this->url->link('product/category', 'path=' . $category_1['category_id'] . '_' . $category_2['category_id']);
$output .= '<a href="'.($sub_unrewritten).'">' . $category_2['name'] . '</a>';
$output .= '</li>';
}
if ($categories_2) {$output .= '';}
$output .= '</ul>';
}
if ($categories_1) {$output .= '';}
echo $output;
?>

</div>
    </li>
</ul>


  <?php foreach ($modules as $module) { ?>
  <?php echo $module; ?>
  <?php } ?>
  
</div>

Anyone know how to get the categories to all run on the top bar?

Thanks

Active Member

Posts

Joined
Mon Oct 18, 2010 5:56 pm
Who is online

Users browsing this forum: No registered users and 3 guests