Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I add "Home" to the left hand side of the menu bar in OpenCart?

Tags:

opencart

How do I add a link to the home page - "Home" - to the left hand side of the menu bar in OpenCart?

Thanks

like image 223
George Woodman Avatar asked Dec 21 '22 10:12

George Woodman


2 Answers

edit catalog/view/theme/<YOUR_THEME>/template/common/header.tpl

Find:

<div id="menu">
  <ul>

Add right below:

    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>
like image 54
Rachel Gallen Avatar answered Apr 28 '23 13:04

Rachel Gallen


Even you can add your custom menus too in the top navigation bar

edit catalog/view/theme//template/common/header.tpl

Find:

<div id="menu">
  <ul>

Then

<li><a href="YOUR_LINK">Menu_Text</a></li>

And also you can add the Pre-defined menu like Information, Customer Service etc..

Information menu

  <?php foreach ($informations as $information) { ?>
      <li>
            <a href="<?php echo $information['href']; ?>">
            <?php echo $information['title']; ?></a>
      </li>
  <?php } ?>

Service Menu

 <li><?php echo $text_service; ?>
    <ul>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
    </ul>
 </li>

Extra Menu

<li><?php echo $text_extra; ?>
    <ul>
      <li><a href="<?php echo $manufacturer; ?>"><?php echo $text_manufacturer; ?></a></li>
      <li><a href="<?php echo $voucher; ?>"><?php echo $text_voucher; ?></a></li>
      <li><a href="<?php echo $affiliate; ?>"><?php echo $text_affiliate; ?></a></li>
      <li><a href="<?php echo $special; ?>"><?php echo $text_special; ?></a></li>
    </ul>
</li>

Account Menu

<li><?php echo $text_account; ?>
    <ul>
      <li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
      <li><a href="<?php echo $order; ?>"><?php echo $text_order; ?></a></li>
      <li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>
      <li><a href="<?php echo $newsletter; ?>"><?php echo $text_newsletter; ?></a></li>
    </ul>
</li>

The Above mentioned Pre-defined menus are working only in the footer area, to add this in top navigation you have to do some changes in header.php

Follow this Link

how to add Information Links in Navigation Menu in opencart?

like image 31
Siva S Tenet Avatar answered Apr 28 '23 11:04

Siva S Tenet