Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore + affiliate – where is "ap_id" set?

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore + affiliate – where is "ap_id" set?

  • This topic has 4 replies, 3 voices, and was last updated 12 years, 11 months ago by halmobi.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 30, 2012 at 9:59 pm #6467
    halmobi
    Spectator

    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

    May 30, 2012 at 10:37 pm #45679
    wzp
    Moderator

    $_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/how-the-wordpress-affiliate-platform-works-14?ap_id=TheAssurer

    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

    June 1, 2012 at 5:10 pm #45680
    halmobi
    Spectator

    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]

    June 2, 2012 at 1:17 am #45681
    admin
    Keymaster

    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

    June 2, 2012 at 5:42 pm #45682
    halmobi
    Spectator

    Understood and thank you for your guidance!

    I will post a separate enhancement suggestion / request.

    Peter

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ