Post by johna1954 » Fri Jan 23, 2015 8:46 pm

Hi,
I would like to add a link to 'Specials' in the main navigation so that it is more prominent. Is this possible? I have looked at header.tpl but do not see a way to add this. Happy to change code but need pointing in the right direction.

Many Thanks in advance

John

Newbie

Posts

Joined
Wed Aug 20, 2014 10:06 pm

Post by Digger » Sun Jun 07, 2015 1:50 am

Bump

Newbie

Posts

Joined
Sun Jul 24, 2011 2:12 am

Post by D3MO » Sun Jun 07, 2015 5:21 am

johna1954 wrote:Hi,
I would like to add a link to 'Specials' in the main navigation so that it is more prominent. Is this possible? I have looked at header.tpl but do not see a way to add this. Happy to change code but need pointing in the right direction.

Many Thanks in advance

John

you can add any links with this extension to your main navigation MODLINK

Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by IP_CAM » Sun Jun 07, 2015 10:20 am

if you know, how tp place a 'direct link' to your specials-section into this VqMod, or then, DIRECTLY into your header.tp file, add a 'regular' HREF-Line, like this:
http://www.hitline.info/shop/index.php? ... odule/blog
But unfortunately, I really can't see, how to call the (OC Default) SPECIALS Module itself as/by a Link. ???

However, you could use this Mod, and just change the URL, PLUS, remove the target="_blank" from the link, to make it work, insinde of the existing Browser-Window.

http://www.opencart.com/index.php?route ... n_id=22447

Good Luck ;)
Ernie
bigmax.ch/shop/

Please do NOT send me Personal Mails, they will no longer be replied to.
---
My Github OC Site: https://github.com/IP-CAM
2'800+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by deepvision » Sun Jun 07, 2015 11:42 am

In the catalog/view/theme/<YOUR THEME>/template/common/header.tpl
change

Code: Select all

<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>
to:

Code: Select all

<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 } ?>
    <li><a href="http://domain.com/index.php?route=product/special">Specials</a>
  </ul>
</div>

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by ancosolutions » Mon Mar 11, 2019 4:55 am

Hello to all,

I am coming back to this topic regarding the link in the category menu nav bar. In Opencart 2.x the solutions you provided is working, but where to add the link for Opencart 3.x?

Could you please help me?

Thanks.

Newbie

Posts

Joined
Wed Feb 13, 2019 4:22 am
Who is online

Users browsing this forum: Google [Bot] and 47 guests