Post by praveen_khm » Wed Nov 23, 2011 8:12 pm

Hi,

I have installed Opencart 1.5.1.3 and very happy with the installation. Everything went like so smooth without any issues.
One thing I noticed was the default installation (without using any templates) shows categories on the left side as well as the horizontal bar on top. Since the cart is supposed to be a part of another main website, I need to change the horizontal bar to reflect other menu buttons. When I go to settings and change the category name, it changes in both the places (as obvious).

Can somebody suggest if there is a way to get different set of buttons there without using any external templates? Ofcourse keeping the UI intact.

P.S: The installation is done on localhost and please do not ask for URL as I would not be able to provide one.

Thanks,
Praveen

New member

Posts

Joined
Wed Nov 23, 2011 8:01 pm

Post by inactiveaccount9912 » Wed Nov 23, 2011 8:29 pm

You can set the top menu to display only specific categories. Every category , when you edit it in admin , under the tab data is a checkbox called top. If checked , the category will show on the top menu , otherwise it wont. Plus the module in the left column is not required , it can be disable in admin > extension > modules.

Also if you want to split the categories into menus , theres Q's split categories module.

But if you mean adding links other than categories to top , you would have to edit the header.tpl file of your current template.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by praveen_khm » Wed Nov 23, 2011 9:04 pm

Thanks for the response florinsith. Based on your response, I can only assume that I have no other go than modifying the header.tpl file. To do this, I think I need to replace category names with other names manually and then add hyperlink to that (Please correct me if I am wrong). Another concern is that if I modify the header for top categories, does it anyway affect other settings? I feel it wouldn't.

Lastly, are there any modules / extensions I can use to achieve this? I mean replacing top header with menu? If not, then I will manually edit them.

BTW, the response in the forum is really quick. I am happy to select Opencart after a week's research.

Thanks

New member

Posts

Joined
Wed Nov 23, 2011 8:01 pm

Post by inactiveaccount9912 » Wed Nov 23, 2011 11:11 pm

Even if it is a module for that , its easyer to just insert them like normal links that , searching , installing, and then configure the module.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by straightlight » Thu Nov 24, 2011 12:36 am

Lastly, are there any modules / extensions I can use to achieve this? I mean replacing top header with menu? If not, then I will manually edit them.
Even if it is a module for that , its easyer to just insert them like normal links that , searching , installing, and then configure the module.
Manipulating the header.tpl manually isn't really about ease of use. It does require understanding on how to execute new extensions vs already loaded. The problem is if at least one extension gets loaded from the header, any other extensions may also be called and, at the present time, it would also recall the already loaded extension that are already initiated from other pages which wouldn't be quite resourceful within OpenCart.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by praveen_khm » Thu Nov 24, 2011 3:20 am

Does this mean there is no way of actually changing the headers? If tomorrow I install another extension which is dependent on header, does it fail?

This is annoying. Why is the style not similar to 1.4 where there were menu buttons (or a possibility to get that). All I need are those distinct buttons separate from categories. I was about to edit the header file, but checked this post to be cautious.

New member

Posts

Joined
Wed Nov 23, 2011 8:01 pm

Post by inactiveaccount9912 » Thu Nov 24, 2011 4:43 am

The code of the menu from header.tpl is

Code: Select all

<?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>
<?php } ?>
to add a link withou interfeering with categories , add it before or after the categories.
<?php if ($categories) { ?>
<div id="menu">
<ul>
<li><a href="link adress">link name</a></li> //link before categories
<?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 } ?>
<li><a href="link adress">link name</a></li> //link after categories
</ul>
</div>
<?php } ?>

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by remcofaasse » Thu Jan 12, 2012 4:25 pm

I believe the followin extension is what you are looking for: Menu Manager

http://www.opencart.com/index.php?route ... earch=menu manager&sort=e.date_modified&order=DESC

New member

Posts

Joined
Mon Dec 05, 2011 2:20 am
Who is online

Users browsing this forum: No registered users and 118 guests