
Hey Thanks so much for your help. We followed the instructions you provided and the Simple Google Analytics eCommerce Tracking worked. BUT, our iDefAffiliate program did not work anymore. So, we had to back out the changes and add revert back to the 'tple_footer.php' file that you recommended we removed.
We did try to add the iDev Affiliate code to the 'tpl_main_page.php' as you suggested to move the JAM code. But, this caused the site to not even load. We don't have a test environment and we are not php coders, but we do want iDevAffiliate and Google Analytics eCommerce tracking to work at the same time. Do you have a suggested approach to resolve this issue?
For your reference, this is the instructions that the iDevAffiliate gives for Zen integration:
ZenCart Version 1.3.x or Newer
1. Download the template override file: Download Here
2. Save the file to your local harddrive.
3. Edit that file and near the bottom, adjust the path to your iDevAffiliate installation folder/directory.
4. Upload that file to your /zencart/includes/templates/your_template_directory/checkout_success/tpl_footer.php directory.
Notes:
1. The directory your_template_directory is the ZenCart template directory you're using.
2. If the directory checkout_success doesn't exist, create it and upload tpl_footer.php into it.
Here are the contents of the 'template override file they provided:
<?PHP
require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
if (!$flag_disable_footer) {
?>
<div id="navSuppWrapper">
<div id="navSupp">
<ul>
<li><?PHP echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?PHP echo HEADER_TITLE_CATALOG; ?></a></li>
<?PHP if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<li><?PHP require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li>
<?PHP } ?>
</ul>
</div>
</div>
<?PHP
if (SHOW_FOOTER_IP == '1') {
?>
<div id="siteinfoIP"><?PHP echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div>
<?PHP
}
?>
<?PHP
if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerFive" class="banners"><?PHP echo zen_display_banner('static', $banner); ?></div>
<?PHP
}
}
?>
<div id="siteinfoLegal" class="legalCopyright"><?PHP echo FOOTER_TEXT_BODY; ?></div>
<?PHP }
if ((int)$orders_id > 0) {
$IDEV = $db->Execute("select class, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders_id."' AND class in ('ot_coupon', 'ot_subtotal', 'ot_group_pricing')");
while (!$IDEV->EOF) {
switch ($IDEV->fields['class']) {
case 'ot_subtotal':
$order_subtotal = $IDEV->fields['value'];
break;
case 'ot_coupon':
$coupon_amount = $IDEV->fields['value'];
break;
case 'ot_group_pricing':
$group_pricing_amount = $IDEV->fields['value'];
break;
}
$IDEV->MoveNext();
}
$idev_sale_amount = ($order_subtotal - $coupon_amount - $group_pricing_amount);
$idev_sale_amount = number_format($idev_sale_amount,2,'.','');
// Make sure the below path is correctly pointing to your installation folder/directory.
echo "<img border=\"0\" src=\"http://www.yourdomain.com/idevaffiliate/sale.php?idev_saleamt=$idev_sale_amount&idev_ordernum=$orders_id\" height=\"1\" width=\"1\">";
echo "</td></tr></table>";
}
?>
Bookmarks