How to easily add a ‘Bookmark Us’ link

November 8, 2008 in Zen Cart Customization

Is this useful? Like it.

You can easily add a ‘Bookmark Us’ link to anywhere on your Zen Cart e-commerce website. This post will show you the steps to add/append a ‘Bookmark Us’ link to the top navigation links.

The code

You just need to add a small block of code to your template’s tpl_header.php file. The file is located at:
includes\templates\YOUR_TEMPLATE\common\tpl_header.php

<!-- START BOOKMARK LINK -->
<script language="javascript">
	<!--
	function bookmarksite(title, url) {
		if (document.all)
			window.external.AddFavorite(url, title);
		else if (window.sidebar)
			alert("Press Ctrl D keys to bookmark our site");
	}
	//-->
</script>
	<li><a href="javascript:bookmarksite('Yoursite.com','http://www.yoursite.com')">Bookmark Us</a></li>
<!-- END BOOKMARK LINK -->

You can copy the block of code above or from the downloaded sample file below.

The Steps

  1. Download the sample tpl_header.php file >> HERE << (DO NOT REPLACE your original file with this — it’s only meant for reference)
  2. Unzip and open the downloaded file with any text editor (even Windows Notepad is okay)
  3. Copy the block of code between ‘START BOOKMARK LINK’ and ‘END BOOKMARK LINK’ (line 66 to 80)
  4. Open your own tpl_header.php file in another text editor window. Your own file should be in:
    includes\templates\YOUR_TEMPLATE\common\tpl_header.php
  5. Paste the code to the same location of your own tpl_header.php file.
  6. The block of code is for a sample URL (yoursite.com) — Replace with your own URL
  7. Save.

You can move the link to any location on your web page if you do not want it to be appended to the end of your top navigation bar.

The code is just Javascript and HTML. Therefore, you can reuse the code for ANY static HTML or dynamic web page, not just for Zen Cart.

Note:
This is a quick and easy way to add a ‘Bookmark Us’ link to your Zen Cart online store, without using the language file. So, even if you have additional language packs, the link will always be displayed in the language you used for for editing tpl_header.php file.

Zen Cart Version: 1.3.8  (the code and method can be used for any other version)

Premium Zen Cart templates from $22 only. Guaranteed unbeatable value! Give your business an advantage over others! Click to see now!

Bookmark and Share

Comments

2 Responses to “How to easily add a ‘Bookmark Us’ link”

  1. Marlo on November 20th, 2009 5:55 am

    Thanks for the coding - added a little umpf to my site! And making it look more professional! Love it - I created it under the EZPages. Worked out great!!! Thank you again!

  2. Ray on March 17th, 2010 8:39 am

    Thanks for the code it worked great first time and was easier to include than I thought possible.

Leave a Reply




Premium Templates

Premium 1 Series ($22~25)

Premium 2 Series ($26)

Premium 3 Series ($29)

Premium 4 Series ($28)

Premium 5 Series ($30)

Premium 6 Series ($30)

Premium 7 Series ($35)

Premium 8 Series ($40)