Post by nemmon » Thu Oct 27, 2011 5:37 am

Hello all,

I have a store at a subdomain for example:

mysite.com/store

I would like to add a menu item called "Go back to my Site" and have that linked to http://mysite.com

I have tried an extension but when I publish it I get errors.
If someone could show me the way... I would appreciate it.

Thank you

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by uksitebuilder » Thu Oct 27, 2011 10:10 pm

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

Find

Code: Select all

  </ul>
</div>
<?php } ?>
<div id="notification"></div>
Add Before

Code: Select all

<li><a href="http://www.google.co.uk">Link Text</a></li>

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by nemmon » Thu Oct 27, 2011 10:31 pm

THANKS!!!!

awesome!

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by WebPuzzles » Thu Nov 10, 2011 7:54 am

I am using OpenCart 1.5.1.3 and when I edit the header.tpl and add the code you suggest, my page jumps from being 1000 px wide (centered on the white background) to a full width edge-to-edge content page. This would be workable, but there is no padding at all and I would prefer to keep the formatting that makes the site content centered between white edge padding.

We are an historical society
http://cnyhistory.com/
with a gift shop at
http://www.cnyhistory.com/giftshop/inde ... ommon/home
and navigation back and forth is necessary.

Thanks,
WP

Newbie

Posts

Joined
Thu Nov 10, 2011 6:49 am

Post by Tiler » Thu Apr 05, 2012 2:47 pm

uksitebuilder wrote:edit catalog/view/theme/default/template/common/header.tpl

Find

Code: Select all

  </ul>
</div>
<?php } ?>
<div id="notification"></div>
Add Before

Code: Select all

<li><a href="http://www.google.co.uk">Link Text</a></li>

When altering this code the new button is added to the furthest right on the menu bar. Is there any way to regulate the position of this newly created button/link ??

Thank you

Trying my best to learn..........
v1.4.9.5


Newbie

Posts

Joined
Thu May 19, 2011 9:06 am

Post by Marcopolo » Fri Apr 27, 2012 7:57 pm

how to put on menu bar first option HOME and remove from above the home link

thanks
best regards
Marco

New member

Posts

Joined
Fri Apr 27, 2012 5:42 pm
Location - Brasov

Post by paco1trip » Fri Nov 02, 2012 7:36 pm

Hi guys, sorry for my english
if you change the language, if you have a second language, who adds;

Thanks!

Newbie

Posts

Joined
Tue Oct 30, 2012 9:53 pm

Post by BasheeraDesigns » Fri Dec 14, 2012 3:50 am

Hi, how do you add an image link instead of a text link?

I have inserted: <li><a href="http://www.basheeradesigns.com/handmadejewelry">button: url('../image/jewelry button.png');</a></li>

but the image doesn't show, it reads: "button: url('../image/jewelry button.png'" instead of displaying an image. It shows up on my slideshow UNDER the logo instead of to the right of the logo.

Could someone please tell me what I am doing wrong?


Posts

Joined
Thu Aug 23, 2012 1:58 pm

Post by almusammem » Tue May 28, 2013 2:30 pm

BasheeraDesigns wrote:Hi, how do you add an image link instead of a text link?

I have inserted: <li><a href="http://www.basheeradesigns.com/handmadejewelry">button: url('../image/jewelry button.png');</a></li>

but the image doesn't show, it reads: "button: url('../image/jewelry button.png'" instead of displaying an image. It shows up on my slideshow UNDER the logo instead of to the right of the logo.

Could someone please tell me what I am doing wrong?
If you want to add an icon for Contact page - for example - then you can use this code :

Code: Select all

<li><a href="index.php?route=information/contact"><img src="image/contact.png"></a></li>

Newbie

Posts

Joined
Wed May 22, 2013 9:23 am

Post by 1975bloom » Sun Jun 09, 2013 10:10 pm

Thank you, just what I was looking for. ;D

New member

Posts

Joined
Wed Apr 10, 2013 10:42 pm

Post by MBCUK » Mon Sep 22, 2014 6:57 am

How do I add mutiple links in a drop down format..

So I want a link on the Top menus saying sizes

then dropdown

size 10
size12
size14
etc...

All linked to a url domain/index.php?route=product/search&search=size%2012

New member

Posts

Joined
Sun Jun 22, 2014 10:07 pm

Post by sunsys » Sat Apr 04, 2015 10:30 pm

uksitebuilder wrote:edit catalog/view/theme/default/template/common/header.tpl

Find

Code: Select all

  </ul>
</div>
<?php } ?>
<div id="notification"></div>
Add Before

Code: Select all

<li><a href="http://www.google.co.uk">Link Text</a></li>
Thanks a lot UKSB, this works perfectly for me and 3 cheers for the good people on OC forum.

Regards,
Sun Systems
Industrial Electronics and Instrumentation


User avatar
Active Member

Posts

Joined
Tue Jan 27, 2015 5:19 am

Post by lancerlabels » Fri Apr 24, 2015 6:17 pm

Hi
When I search for the text in header.tpl
</ul>
</div>
<?php } ?>
<div id="notification"></div>

I can only find

</div>
<?php } ?>
<div id="notification"></div>

No </ul>

The text shown in the tpl is as follows: -

<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php if ($stores) { ?>
<script type="text/javascript"><!--
$(document).ready(function() {
<?php foreach ($stores as $store) { ?>
$('body').prepend('<iframe src="<?php echo $store; ?>" style="display: none;"></iframe>');
<?php } ?>
});
//--></script>
<?php } ?>
<?php echo $google_analytics; ?>
</head>
<body>
<div id="container">
<div id="header">
<?php if ($logo) { ?>
<div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
<?php } ?>
<?php echo $language; ?>
<?php echo $currency; ?>
<?php echo $cart; ?>
<div id="search">
<div class="button-search"></div>
<input type="text" name="search" placeholder="<?php echo $text_search; ?>" value="<?php echo $search; ?>" />
</div>
<div id="welcome">
<?php if (!$logged) { ?>
<?php echo $text_welcome; ?>
<?php } else { ?>
<?php echo $text_logged; ?>
<?php } ?>
</div>
<div class="links"><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a><a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a><a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
</div>
<?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 } ?>
<?php if ($error) { ?>

<div class="warning"><?php echo $error ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>

<?php } ?>
<div id="notification"></div>

Can you please advise where to put the new text - <li><a href="http://www.google.co.uk">Link Text</a></li>

Thank you
Llewellyn

New member

Posts

Joined
Mon Jul 09, 2012 10:23 pm

Post by gailnmalc » Sun Aug 16, 2015 5:26 pm

Hi, please can anybody advise on how to add a back link to shopping directories i'm on 1.5.6 ?
Thanks in advance

User avatar
Newbie

Posts

Joined
Sun Aug 16, 2015 1:56 am

Post by IP_CAM » Sun Sep 20, 2015 12:55 am

check this:
http://www.opencart.com/index.php?route ... n_id=22447
good Luck
Ernie
opencart.li/shop/

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

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

Post by ranjan08 » Sat Jun 11, 2016 8:47 pm

Hi!

To achieve this you have to navigate to line no. 94 - (edit catalog/view/theme/default/template/common/header.tpl )
press enter and the the following line:

93 <div class="collapse navbar-collapse navbar-ex1-collapse">
94 <ul class="nav navbar-nav">
95(new) <li><a href="your link">Home</a></li>

This will give you a Home button on first left of navigation bar.

Thanks!
RKS

Newbie

Posts

Joined
Sat Jun 11, 2016 8:43 pm
Who is online

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