%%cv1%% = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute, inside your Shortcode, like this: custom="www.mydomain.com|cv1|cv2|cv3". You can have an unlimited number of custom variables that track IP addresses, affiliate IDs, etc. In some cases you may need to use PHP code to insert a value into the custom field dynamically. Obviously this is for advanced webmasters, but the functionality has been made available for those who need it.
This example uses cv1 to track a User's IP address:
( The IP address could be referenced using %%cv1%% )
custom="www.mydomain.com|<?php echo $_SERVER["REMOTE_ADDR"]; ?>"
All you need to do is specify the URL of the ipn handling script in your PayPal button’s code. For example:
<input type="hidden" name="notify_url" value="http://www.your-domain-name.com/wp-content/plugins/wp-affiliate-platform/api/ipn_handler.php">
And add the Affiliate’s ID to the “custom” field of the button from the cookie. For example:
<input type="hidden" name="custom" value="<?php echo $_COOKIE['ap_id']; ?>">
Statistics: Posted by chelle — October 15th, 2010, 1:16 pm