Post by T3Kaos » Tue Oct 25, 2011 7:07 pm

How do I add a normal link as an item to the header menu on OpenCart. For example along the top of the website you have the Top Menu, I would like to have a link going back to its parent site.

For example the main site is http://samkinggroupsl.com and the estore site is http://estore.samkinggroupsl.com. On the parent site there is a link in the top menu (header menu) linking to the estore, however I need to know how to add a link back to the parent site from the estore site to the estore site's header menu also.

Any ideas?

New member

Posts

Joined
Fri Sep 02, 2011 9:31 pm
Location - London, UK

Post by SXGuy » Tue Oct 25, 2011 7:59 pm

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

find

<div id="menu">

add under it

</li><a href="http://samkinggroupsl.com/">HOME</a></li>

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by Doug » Tue Sep 04, 2012 3:24 pm

Hello everyone... lookin for a little love here...

I'm trying to add a menu item to my category menu and messed around a bit with this suggestion and it works well. The thing I need to do now is get the formatting of the menu item to look like the rest.

I know this will come from a css class I just don't know how to code it. Here's what I'm working with...

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://pocketchalker.com/blog/">MORE</a></li>
  </ul>
</div>
I added the

Code: Select all

</li><a href="http://pocketchalker.com/blog/">MORE</a></li>
and now I want to get it to look like the menu.

Here are the menu classes included in the stylesheet...

Code: Select all

#menu > ul > li > a {
	font-size: 15px;
	color: #FFF;
	font-family: 'SteinemBold', Arial, Helvetica, sans-serif;
	line-height: 10px;
	text-decoration: none;
	text-transform:uppercase;
	text-shadow:2px 2px 2px #000;
	display: block;
	padding: 18px 15px 11px 15px;
	z-index: 6;
	position: relative;
	background: url('../image/topmenu-spaser.png') no-repeat right center;
}
#menu > ul > li > div {
	display: none;
	background: #FFFFFF;
	position: absolute;
	z-index: 5;
	margin-top: 10px;
	padding: 5px;
	border: 1px solid #303030;
	-webkit-border-radius: 0px 0px 5px 5px;
	-moz-border-radius: 0px 0px 5px 5px;
	-khtml-border-radius: 0px 0px 5px 5px;
	border-radius: 0px 0px 5px 5px;
	background: url('../image/bg-menu-podmenu.gif');
}
#menu > ul > li:hover > div {
	display: table;
}
#menu > ul > li > div > ul {
	display: table-cell;
}
#menu > ul > li ul + ul {
	padding-left: 20px;
}
#menu > ul > li ul > li > a {
	text-decoration: none;
	padding: 4px;
	color: #FFFFFF;
	display: block;
	white-space: nowrap;
	min-width: 120px;
	border-bottom:1px solid #0d0d0d;
}
#menu > ul > li ul > li > a:hover {
	background: url('../image/bg-menu-podmenu-hover.gif') repeat;
}
#menu > ul > li > div > ul > li > a {
	color: #FFFFFF;
}
Any help would surely be appreciated.
Doug

Semi-Experienced* in Wordpress, Joomla and played with Prestashop...but very little. Learned enough of Prestashop to discover I didn't like the complexity of it.

Now learning Open Cart running version 1.5.1.3

*Been around the block with css, understand a bit of html and js, don't know a thing about php.

Sites and projects:

http://Pocketchalker.com
http://Doug.pl
http://nes.pila.pl


User avatar
Newbie

Posts

Joined
Wed Dec 07, 2011 7:39 pm
Location - Piła, Poland
Who is online

Users browsing this forum: No registered users and 21 guests