I need help with this installation. I am using smart backgrounds and am wondering if there is a conflict with this mod or if I just installed it incorrectly.
My site is www.residentpress.com
Thanks.
Kelly
I need help with this installation. I am using smart backgrounds and am wondering if there is a conflict with this mod or if I just installed it incorrectly.
My site is www.residentpress.com
Thanks.
Kelly
There should be no conflict with Smart Backgrounds. They should work together providing you put the code in the right spots.
I went to your site and the tracking is not showing. I have not used the Smart Backgrounds mod, but if it alters the Footer in any way, that might be your problem. I have seen with affiliate programs where the footer override causes the code not to show and correction of this is an easy fix.
In your case it may be that as well (again, never used the Smart Pages mod but this would likely be true if the footer file was altered.)
The other thing you might want to check is if you completed step 3 of the install read me. There is some code that needs to be pasted into the tpl_main_page.php file in order for the Google tracking to be added to the site.
Let me know if any of this helps or not and we'll work through it to make sure it is working for you.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Eric,
Thank you for your quick response. Here's my copy of the main_page. I think I have all your edits correct.
<?php
/**
* Common Template - tpl_main_page.php
*
* Governs the overall layout of an entire page<br />
* Normally consisting of a header, left side column. center column. right side column and footer<br />
* For customizing, this file can be copied to /templates/your_template_dir/pagename<br />
* example: to override the privacy page<br />
* - make a directory /templates/my_template/privacy<br />
* - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />
* <br />
* to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br />
* to turn off the header and/or footer uncomment the lines below<br />
* Note: header can be disabled in the tpl_header.php<br />
* Note: footer can be disabled in the tpl_footer.php<br />
* <br />
* $flag_disable_header = true;<br />
* $flag_disable_left = true;<br />
* $flag_disable_right = true;<br />
* $flag_disable_footer = true;<br />
* <br />
* // example to not display right column on main page when Always Show Categories is OFF<br />
* <br />
* if ($current_page_base == 'index' and $cPath == '') {<br />
* $flag_disable_right = true;<br />
* }<br />
* <br />
* example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
* <br />
* if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br />
* $flag_disable_right = true;<br />
* }<br />
*
* @package templateSystem
* @copyright Copyright 2003-2007 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_main_page.php 7085 2007-09-22 04:56:31Z ajeh $
* Modified for Smart Backgrounds v2.1.1 by Glenn Herbert (gjh42) 2009-01-11
*/
// the following IF statement can be duplicated/modified as needed to set additional flags
if ($this_is_home_page) {
$flag_disable_left = true;
}
if ($this_is_home_page) {
$flag_disable_right = true;
}
if (in_array($current_page_base,explode(",",'login,shopping_cart,checkout_shipping, shippinginfo,privacy,conditions,account,contact_us,checkout_payment,checkout_con firmation,tell_a_friend')) ) {
$flag_disable_right = true;
}
if (in_array($current_page_base,explode(",",'login,contact_us,account,shopping_cart ,checkout_shipping,shippinginfo,privacy,conditions,checkout_payment,checkout_con firmation,tell_a_friend')) ) {
$flag_disable_left = true;
}
$header_template = 'tpl_header.php';
$footer_template = 'tpl_footer.php';
$left_column_file = 'column_left.php';
$right_column_file = 'column_right.php';
$body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
?>
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
<!--Smart Backgrounds-->
<?php $smart_image = '';
if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to filename only if individual cat image exists, else add _ and top cat id to bg filename only if top cat image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'');
} elseif ($current_page_base == 'page') { //add _page and ez-page id to filename only if ez-page id image exists, else add _page to filename only if general ez-page image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'');
} else { //add _ and page base to filename only if page image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $current_page_base . '.gif')?'_' . $current_page_base:''; //default/home page class will be just .smartBG, and filename smartbg.gif
}?>
<!--/Smart Backgrounds-->
<div id="mainWrapper">
<?php
/**
* prepares and displays header output
*
*/
if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
$flag_disable_header = true;
}
require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper">
<tr>
<!-- bof breadcrumb -->
<?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
<div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->
<?php
if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
// global disable of column_left
$flag_disable_left = true;
}
if (!isset($flag_disable_left) || !$flag_disable_left) {
?>
<td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>">
<?php
/**
* prepares and displays left column sideboxes
*
*/
?>
<div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td>
<?php
}
?>
<td valign="top">
<?php
if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!-- bof upload alerts -->
<?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
<!-- eof upload alerts -->
<?php
/**
* prepares and displays center column
*
*/
require($body_code); ?>
<?php
if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?></td>
<?php
//if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) {
if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
// global disable of column_right
$flag_disable_right = true;
}
if (!isset($flag_disable_right) || !$flag_disable_right) {
?>
<td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>">
<?php
/**
* prepares and displays right column sideboxes
*
*/
?>
<div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td>
<?php
}
?>
</tr>
</table>
<?php
/**
* prepares and displays footer output
*
*/
if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
$flag_disable_footer = true;
}
require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
?>
</div>
<!--bof- parse time display -->
<?php
if (DISPLAY_PAGE_PARSE_TIME == 'true') {
?>
<div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
<?php
}
?>
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<?php
if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!--eof- banner #6 display -->
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
</body>
Yes, that is correct.
Since the code is placed properly yet is still not showing up on your site make sure you:
1) Check to ensure the tpl_main_page.php is in the proper location for the template you are using.
2) The Smart Backgrounds does not override the footer file in any way with it's own code (which might override this.)
I would suspect it is probably more than likely #1 on this list.
If we can't get it figure out I can get in and take a look for you.
Just let me know.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Okay. I double check the smartbackground mod and no, there weren't any changes to the footer. My tpl_main_page.php file is located in /includes/templates./residentpress/common/
That's correct, right? My only other change is that I renamed my admin file however I can see the google ananlytics configuration tab in my admin panel. So my "admin" sees the files. Hmmm....
Thanks in advance for you help. Let me know what you think I should do next. Thanks.
Kelly
Ok on the smart backgrounds.
Renaming the admin won't so anything so you're ok there.
The location of the file would be correct providing that is yoru template directory (which it looks to be.)
Do this. Send me your login info (Admin Zen and FTP) through a private message and I'll take a look.
Should be a very quick fix.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Hold on a second. I just went to your site and the code is now showing. Whatever you did in the recent changes (or something) seemed to have got it working.
The tracking code now looks to be in place.
To confirm this you can pull up any page on your site and then do a "view source". The code is a the very bottom now.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information