- This topic has 1 reply, 2 voices, and was last updated 13 years, 10 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate General Questions › 3rd Party Integration for Affiliate Platform – How to award commission
hi, im trying to implement this affiliate tool at jersey sweet (dotcom, dont want search engines finding this post). the site is a wordpress plugin already. a user there gave me this code:
if ( isset($_GET) && ($_GET != ‘0’ || $_GET != null) ) {
$userID = Group_Buying_Utility::getCurrentUserId();
?>
<iframe src=”http://www.example.com/wp-content/plugins/wp-affiliate-platform/api/post.php?secret=XXXXXXX&trans_id=<?php echo $_GET ?>&ap_id=XXXXXXXX&sale_amt=<?php echo get_deal_value_in_credits( $_GET ); ?>&item_id=<?php echo $_GET ?>” scrolling=”no” frameborder=”0″ width=”1″ height=”1″></iframe>
<?php
}
if ( isset($_GET) && ‘registered’ == $_GET ) {
$userID = Group_Buying_Utility::getCurrentUserId();
?>
<iframe src=”http://www.example.com/wp-content/plugins/wp-affiliate-platform/api/post.php?secret=XXXXXXX&trans_id=REGISTRATION&ap_id=XXXXXXXX&item_id=REGISTRATION” scrolling=”no” frameborder=”0″ width=”1″ height=”1″></iframe>
<?php
}
He suggested you’d be able to get this working for me. He said the conditionals are correct and the top one works for purchases, the second works for registrations.
Your help would be tremendously appreciated as I need to be able to track affiliates asap.
Thanks!
I don’t really have any context so don’t what is going on.
The “XXXXXXX” values are the puzzles that you need to solve. Do you know what to do with them? The secret code can be found in the settings menu of the affiliate plugin so thats not a problem. The value of the ‘ap_id’ field needs to be replaced with the appropriate affiliate ID. this value is stored in the cookie so you can change ap_id=XXXXXXXX
with the following:
ap_id = $_COOKIE['ap_id']
Once you make this two changes (basically get rid of the “XXXXXXX” with their proper value) you should be there.
Just so you know where this is coming from. This is the documentation:
http://www.tipsandtricks-hq.com/wordpress-affiliate/awarding-commission-via-http-get-or-post-189