I am trying to pass an additional value to a string for an affiliate tracking module URL.

The value is a channel ID which should appear after the currency code like as follows:


The problem is I can't get it to pass, I can see the ch parameter in the url but not the aw


Here's my code from system.xml


First array:

$data = array('tt'      => 'ns',
    'tv'        => '2',
    'merchant'=> $_pr_settings['program_id'],
    'amount'    => $_orderdata['item_total_sale_count'],
    'ref'       => $_orderdata['increment_id'],
    'parts' => implode('|',$parts),
    'vc'        => $_orderdata['coupon_code'],
    'testmode'=> $_settings['test'],
    'cr'        => $_orderdata['global_currency_code'],
    'ch'      => $_setting['channel']);

Image pixel

$html .= '<img src="https://www.awin1.com/sread.img?'.implode('&amp;', $noscript_string,'&amp;', 'ch=aw').'" />

The sale channel

<script type="text/javascript">
var AWIN = {};
AWIN.Tracking = {};
AWIN.Tracking.Sale = {};
AWIN.Tracking.Sale.amount = \''.$_orderdata['item_total_sale_count'].'\';
AWIN.Tracking.Sale.currency = \''.$_orderdata['global_currency_code'].'\';
AWIN.Tracking.Sale.orderRef = \''.$_orderdata['increment_id'].'\';
AWIN.Tracking.Sale.parts = \''.implode('|',$parts).'\';
AWIN.Tracking.Sale.voucher = \''.$_orderdata['coupon_code'].'\';
AWIN.Tracking.Sale.test = \''.$_settings['test'].'\';
AWIN.Tracking.Sale.channel = \''.$_settings['aw'].'\';

I've been here allday trying to figure out what I've done wrong, any help would be much appreciated.


Not sure if this is really a Magento question, but the two times you use the array you use a different element in the array:

'ch'      => $_setting['channel']);
AWIN.Tracking.Sale.channel = \''.$_settings['aw'].'\';

Without know more about the system etc I would suggest that these two should be the same element.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.