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

iDev Affiliate and WP eStore Integration

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore F.A.Q/Instructions › iDev Affiliate and WP eStore Integration

Tagged: affiliate, iDev Affiliate Integration, integration

  • This topic has 23 replies, 5 voices, and was last updated 14 years ago by amin007.
Viewing 15 posts - 1 through 15 (of 24 total)
1 2 →
  • Author
    Posts
  • April 19, 2010 at 1:28 am #880
    amin007
    Participant

    If you want to integrate iDev Affiliate (iDevDirect – http://www.idevdirect.com) with WP eStore then follow this tweak.

    1. Open the “paypal.php” file and search for the following line of code:

    $this->debug_log('Updating Affiliate Database Table with Sales Data if Using the WP Affiliate Platform Plugin.',true);

    2. Once you find it add the following block of code just above that line:

    $profile = "72198";//Specify your profile number
    $ip = $customvariables['ip'];
    $sale_amount = $this->ipn_data['mc_gross'];
    $order_num = $this->ipn_data['txn_id'];
    $prepared_url = "http://www.site.com/idevaffiliate/sale.php?profile=".$profile."&idev_saleamt=".$sale_amount."&idev_ordernum=".$order_num."&ip_address=".$ip;
    $this->debug_log('Adding iDev commission. Prepared URL = '.$prepared_url,true);

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $prepared_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_exec($ch);
    curl_close($ch);

    You will need to change “72198” with your actual profile number and “www.site.com” with the appropriate URL.

    Now, run a test traction and make sure everything is working.

    April 19, 2010 at 1:58 am #19799
    MikeM
    Member

    OK, I think it seems to be working :-) Thanks. Now of course I am going to ask for more :-)

    Any way to get the customer name and the product name that they ordered? I know in DLGuard iDev added:

    &idev_option_1=%%customername%%&idev_option_3=%%productname%%

    So would replacing the %%customername%% and %%productname%% variables with yours send back that information?

    Thanks for all this help by the way, I really appreciate it.

    MikeM

    April 19, 2010 at 11:23 pm #19800
    amin007
    Participant

    You can get the customer name like the following:

    $customer_name = $this->ipn_data['first_name']." ".$this->ipn_data['last_name'];

    Getting the product name is a bit tricky… product name will work fine for one product purchase but what will you do for a cart checkout where there will be multiple products in the shopping cart?

    April 20, 2010 at 12:57 pm #19801
    MikeM
    Member

    Would you put the customer name code in the $prepared_url string or in the line above it? Or both?

    Thanks.

    MikeM

    April 20, 2010 at 10:50 pm #19802
    amin007
    Participant

    Yeah you will need to add the customer name from the variable to the URL… so the prepared URL will become like the following:

    $prepared_url = "http://www.site.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=".$sale_amount."&idev_ordernum=".$order_num."&ip_address=".$ip."&idev_option_1=".$customer_name;

    April 20, 2010 at 10:59 pm #19803
    MikeM
    Member

    Cool. I’ll give it a try tonight.

    Thanks.

    MikeM

    April 21, 2010 at 12:40 am #19804
    MikeM
    Member

    OK, I tried the code and I am not getting the customer name, so just to make sure I have it right, here is exactly what I put in the paypal.php:

    _____________________________________________

    $ip = $customvariables;

    $sale_amount = $this->ipn_data;

    $order_num = $this->ipn_data;

    $customer_name = $this->ipn_data.” “.$this->ipn_data;

    $prepared_url = “http://site.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=”.$sale_amount.”&idev_ordernum=”.$order_num.”&ip_address=”.$ip.”&idev_option_1=”.$customer_name;

    $this->debug_log(‘Adding iDev commission. Prepared URL = ‘.$prepared_url,true);

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $prepared_url);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    curl_exec($ch);

    curl_close($ch);

    _________________________________________________________

    I am getting the transaction id and sale amount, so that works, just not passing the name.

    Thanks.

    Mike M

    April 21, 2010 at 3:51 am #19805
    amin007
    Participant

    The code looks fine to me… please run the transaction with debug enabled then look for the following text in the debug file:

    Adding iDev commission. Prepared URL

    Let me know what the “Prepared URL” is.. I am pretty sure the customer name is getting appended to the URL but if you have configured iDev to use it properly is a different question.

    April 21, 2010 at 1:07 pm #19806
    MikeM
    Member

    Actually, I see it is recording the first name, but not the last. Not sure how I missed that, but I will send a help ticket to iDev with the details and see what they have to say about the last name.

    Thanks.

    Mike M

    April 21, 2010 at 7:36 pm #19807
    MikeM
    Member

    Here is what the iDev support said as to why the last name is not showing up:

    ________________________________________

    Well this is being chopped.

    idev_option_1=Flo Murphy

    You’d need this to be sent using standard HTML.

    idev_option_1=Flo%20Murphy

    %20 would be a space.

    Try HTML entities or some other piece of code to conver the data before assigning it to a URL.

    __________________________________________

    Is that easily doable?

    Thanks.

    MikeM

    April 22, 2010 at 5:23 am #19808
    amin007
    Participant

    Yeah, modify the customer name variable to use the following:

    $customer_name = $this->ipn_data['first_name']."%20".$this->ipn_data['last_name'];

    April 22, 2010 at 1:06 pm #19809
    MikeM
    Member

    Thanks. That worked.

    Mike M

    May 16, 2010 at 7:29 pm #19810
    william
    Member

    Hi,

    I too bought iDevAffiliate to enable my Affiliates to have 1 admin centre across

    my multiple websites. Do I understand correctly that I need to modify the WP eStore php files (mentioned above) on all the domains I am tracking sales/leads for?

    (logic says yes). If so, can I modify 1 lot and then copy it across or are php files website specific. I am not much of a programmer so not sure if php files contain certain values that are updated.

    Thanks for your help.

    William

    May 17, 2010 at 3:38 am #19811
    amin007
    Participant

    You can modify one PHP file and copy it accross to all your sites.

    May 23, 2010 at 2:30 am #19812
    william
    Member

    Sorry, I must be missing a step somewhere.

    What integration method should I choose on the iDev side? I cannot see WP eStore in the

    looong list, choosing Paypal BuyNow & Subscriptions requires a php page, and the

    only other option I see is Generic Tracking Pixel; which I saw you addressed in another post as not working.

    Thanks for your insights.

    Regards,

    William

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 24 total)
1 2 →
  • 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