0

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:

cr=GBP&ch=aw

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

http://www.awin1.com/sread.js?a=5914&b=399.99&cr=USD&c=100000008&d=default:399.99&vc=&t=1&**ch**=&cks=&l=http

Here's my code from system.xml

                <channel>
                    <label>Channel</label>
                    <frontent_type>text</frontent_type>
                    <sort_order>100</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                </channel>

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">
//<![CDATA[
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'].'\';
//]]>
</script>';

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

1

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.