I need to add some sales tracking code into my zencart install, and no matter where I install it in the checkout_success.php it always seems to skew the css so it looks terrible when people checkout.
The instructions I have been given are:
====
The outbound code needs to be inserted at the end of:
includes\languages\english\checkout_success.php
The Outbound Code (Including the php):
<?php
$ST_orders_query = "select orders_id, order_total, order_tax from " . TABLE_ORDERS . "
where customers_id = '" . (int)$_SESSION['customer_id'] . "'
order by date_purchased desc limit 1";
$ST_orders = $db->Execute($ST_orders_query);
$ST_orderid = $ST_orders->fields['orders_id'];
$ST_order_total = ((float)$ST_orders->fields['order_total']) + ((float)$ST_orders->fields['order_tax']);
$ST_global_query = "select global_product_notifications from " . TABLE_CUSTOMERS_INFO . "
where customers_info_id = '" . (int)$_SESSION['customer_id'] . "'";
$ST_global = $db->Execute($ST_global_query);
if ($ST_global->fields['global_product_notifications'] != '1') {
$ST_products_array = array();
$ST_products_query = "select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . "
where orders_id = '" . $ST_orderid . "'
order by products_name";
$ST_products = $db->Execute($ST_products_query);
$ST_item_count =0;
while (!$ST_products->EOF) {
$ST_products_array[] = array('id' => $ST_products->fields['products_id'],
'text' => $ST_products->fields['products_name']);
$ST_item_count++;
$ST_products->MoveNext();
}
}
?>
<!-- Copyright since 2004 - SaleTrack.co.uk - empowered marketing -->
<script language="javascript" type="text/javascript">
<!--
var parm,data,stImage,stCSS,stOutput,htprot='http';
data = 'cid=257120&cs=<?php echo $ST_order_total; ?>&it=<?php echo $ST_item_count; ?>&oi=<?php echo $ST_orderid; ?>';
parm=' border="0" hspace="0" vspace="0" width="1" height="1" alt="" ';
if(self.location.protocol=='https:')htprot='https';
stImage = '<img '+parm+' src="'+htprot+'://stats1.saletrack.co.uk/scripts/stexit.asp?'+ data + '">';
stCSS = '<style text="text/css">#SaleTrackLayer { position:absolute; width:1px; height:1px; z-index:1; left: 0px; top: 0px; }</style>';
stOutput = stCSS + '<div id="SaleTrackLayer">' + stImage + '</div>';
document.write(stOutput);
//-->
</script>
<noscript>
<style text="text/css"> #SaleTrackLayer { position:absolute; width:1px; height:1px; z-index:1; left: 0px; top: 0px; } </style>
<div id="SaleTrackLayer">
<img src="http://stats1.saletrack.co.uk/scripts/stexit.asp?cid=257120&cs=<?php echo $ST_order_total; ?>&it=<?php echo $ST_item_count; ?>&oi=<?php echo $ST_orderid; ?>" border="0" width="0" height="0" alt="">
</div>
</noscript>
<!-- /SaleTrack.co.uk - empowered marketing -->
=====
I added this to the end of the code for the checkout page, but it knocks out the css and makes the text jumbo sized. Can anyone advise where this should be inserted?



