Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Integration with JROX Jam Affiliate Manager › Reply To: Integration with JROX Jam Affiliate Manager
Now it becomes soooooo much easier… this is what I asked for when I mentioned how I integrated WP eStore with the iDev affiliate program.
Integrating WP eStore with JROX Jam Affiliate Software
1. Open the “wp_eStore1.php” file and find the following function:
function eStore_get_custom_field_value()
once you find it just add the following towards the end of the function (just before the return statement):
$name = 'jrox_cookie';
$value = $_COOKIE['jrox'];
$custom_field_val = append_values_to_custom_field($name,$value);
That will add it to the custom field.
2. Now open the “paypal.php” file and search for the following line:
$this->debug_log(‘Updating Affiliate Database Table with Sales Data if Using the WP Affiliate Platform Plugin.’,true);
once you find that line add the following bit of code just before that line:
$sale_amt = $this->ipn_data;
$trans_id = $this->ipn_data;
$jrox_cookie = $customvariables;
$JAMIntegrate = file_get_contents(“http://www.mydomainname.com/affiliates/sale.php?amount=”.$sale_amt.”&trans_id=”.$trans_id.”&custom_mid=”.$jrox_cookie);
$this->debug_log(‘Awarding JROX affiliate commission.’,true);
That should do it. Let me know how you go.