Hello
I have to insert some javascript code for my affiliate program.
I believe I need to insert it into the checkout success page.
I pasted it in to
includes/templates/MYTEMPLATE/templates/tpl_checkout_success_default.php...
And basically it doesn't do what it supposed to do which is send basic order details to my affiliate program....
Uhm and I have no idea what to do next...
This is the code without my variables and values relevant to my site like account number.
<script language="JavaScript" type="text/javascript">
<!--
/*** Set your transaction parameters ***/
var aw_mid = '';
var aw_sale = '';
var aw_extra = '';
var aw_parts = '';
var aw_test = '';
/*** Do not edit below here. ***/
call = location.protocol.toLowerCase()+"//www.aw";
call += "in1.co"+"m/sread.j"+"s?a="+aw_mid+"&b="+aw_sale+"&c="+aw_extra+"&d="+aw_parts;
call += "&t="+aw_test+"&l="+escape(window.location.href)+"&tv=1.0";
document.write("<s"+"cript language=\"JavaS"+"cript\" type=\"text/javas"+"cript\" src=\""+call+"&tt=js\" id=\"aw_tag\"></s"+"cript>");
var oImage = new Image;
oImage.src = call+"&tt=ia";
-->
</script>
<noscript>
<img src="https://www.awin1.com/sread.img?tt=ns&tv=1.0&merchant={merchant_id}&amount={sale_amount}&ref={order_re ferrence}&parts={transaction_parts}&testmode={0 or 1}" />
</noscript>
And this is the code with my variables in:-
<script language="JavaScript" type="text/javascript">
<!--
/*** Set your transaction parameters ***/
var aw_mid = '2020';
var aw_sale = 'order_total';
var aw_extra = 'orders_id';
var aw_parts = 'default:order_total';
var aw_test = '0';
/*** Do not edit below here. ***/
call = location.protocol.toLowerCase()+"//www.aw";
call += "in1.co"+"m/sread.j"+"s?a="+aw_mid+"&b="+aw_sale+"&c="+aw_extra+"&d="+aw_parts;
call += "&t="+aw_test+"&l="+escape(window.location.href)+"&tv=1.0";
document.write("<s"+"cript language=\"JavaS"+"cript\" type=\"text/javas"+"cript\" src=\""+call+"&tt=js\" id=\"aw_tag\"></s"+"cript>");
var oImage = new Image;
oImage.src = call+"&tt=ia";
-->
</script>
<noscript>
<img src="https://www.awin1.com/sread.img?tt=ns&tv=1.0&merchant=2020&amount=order_total&ref=orders_id&parts=defa ult:order_total&testmode=0" />
</noscript>
I think it might have something to do with I'm not inserting into the php file properly...
Help!
Thanks
Zohe



