- This topic has 4 replies, 3 voices, and was last updated 12 years, 5 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 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 eStore Forum › eStore + affiliate – where is "ap_id" set?
Hello,
Can you please tell me the file location of the code where the ap_id cookie is set during the purchase process? (contains the Affiliate Id of the referrer).
Thanks
Peter
$_COOKIE is set by the user’s browser.
http://php.net/manual/en/reserved.variables.cookies.php
The actual creation and placement of the cookie, onto the user’s computer, is handled by the WP Affiliate Platform plugin:
http://www.tipsandtricks-hq.com/wordpress-affiliate?ap_id=TheAssurer
In the above examples, upon landing on the designated page, the Affiliate Platform plugin copies the ap_id info, from the URL query string and sets the cookie on the user’s computer. When the user makes a purchase, the cookie is passed back in the $_COOKIE array as $_COOKIE which is then detected by the eStore plugin.
If you were asking, with the intent of setting a “default” affiliate ID, this may be of interest to you:
https://support.tipsandtricks-hq.com/forums/topic/automatically-tying-a-sale-to-an-affiliate
Hello and thank you so much for your prompt and informative reply! We have been digesting the information, looking at a solution.
We had been looking at cookies for a solution, since the ap_id cookie is set when the “Apply” button is clicked to apply the discount during the purchase process. This cookie should contain the Affiliate ID, our version wrongly contains a unique coupon code that we generate and is associated with a particular Affiliate as explained here.
[admin deleted code]
This type of customization discussion is beyond the scope of this support forum. Please review our forum rules (pay attention to point #3):
https://support.tipsandtricks-hq.com/forums/topic/forum-rules
Understood and thank you for your guidance!
I will post a separate enhancement suggestion / request.
Peter