It's all starting to become alot clearer however... when I try to put the canonical code into my html_header.php file I can't ever find it in my templates directory, I only find tpl_header.php which I guess is the same file but can't insert the code without causing the site to display a pure white page....
This is my current code:
<?php
/**
* Atheme Template - tpl_header.php
*
* @package templateSystem
* @copyright Copyright 2007 iChoze Internet Solutions
http://ichoze.com
* @copyright Portions Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license
http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
*/
?>
<?php
// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {
}
?>
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="headerWrapper">
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
<?php if (HEADER_SALES_TEXT != '') { ?>
<div id="taglineWrapper">
<?php
if (HEADER_SALES_TEXT != '') {
?>
<div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php
}
?>
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
<ul class="back">
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> |</li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> |</li>
<li><a href="<?php echo zen_href_link(FILENAME_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_SHIPPING; ?></a></li>
<?php } } ?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<li> | <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>
</div>
<!--eof-navigation display-->
</div>
<?php } // no HEADER_SALES_TEXT ?>
</div>
<br class="clearBoth" />
<!--eof-branding display-->
<!--eof-header logo and navigation display-->
</div>
<?php
if (HEADER_DROP_SWITCH == '1'){
require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');
}else{
require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php');
}?>
<div id="searchCartBarWrapper">
<div id="searchCartBar">
<div id="cartContent">
<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo $_SESSION['cart']->count_contents() . HEADER_TITLE_CCONTENTS; ?></a>
</div>
<div id="altLinks">
<a href="<?php echo zen_href_link(FILENAME_SPECIALS, '', 'NONSSL'); ?>"><?php echo HEADER_SUB_SPECIALS;?></a> |
<a href="<?php echo zen_href_link(FILENAME_FEATURED_PRODUCTS, '', 'NONSSL'); ?>"><?php echo HEADER_SUB_FEATURED;?></a> |
<a href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL, '', 'NONSSL'); ?>"><?php echo HEADER_SUB_ALLPRODUCTS;?></a>
</div>
<?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?>
</div>
<?php
if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php');
}?><div class="clearBoth"></div>
</div>
but here
http://www.jasonjgreen.com/blog/cano...-for-zen-cart/
mentions putting this
<!– Begin SE Canonical –>
<link rel=”canonical” href= <?php
$original_url = HTTP_SERVER . $_SERVER[’REQUEST_URI’];
$split_url = explode(’?', $original_url);
$no_querystring_url = $split_url[0];
echo $no_querystring_url; ?> />
<!– End SE Canonical –>
Here
Simply copy and paste the script right after the closing title tag (</title>) of your html_header.php file (located in your Common folder of your custom template folder in your Zen Cart installation).
So I fall down at this point, am I missing the right place to drop this code or am I in the wrong file all together
Thanks for your help and I will certainly make these changes tomorrow and come back for any further help left.....
For what is a hugely important amendement to make to any site that wants to be somewhere worth while you are clearly leading the way on this topic...
Good on you
my site is
www.simonbbc.com if you can see anything else wrong with some of the diag tools you would use too

Bookmarks