Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password?

Search the Forum

Tips and Tricks HQ Forum » WP eStore Forum » WP eStore Tweaks

WP eStore and JROX JAM Affiliate Manager Integration

(8 posts) (3 voices)
  • Started 2 years ago by amin007
  • Latest reply from amin007
  • Related Topics:
    1. Integration with JROX Jam Affiliate Manager
    2. eStore, eMember, Affiliate Platform, pdf Stamper, and mailchimp integration
    3. Integration with Affiliate, eStore, and e Member
    4. I noticed there is MailChimp integration with eStore, how about WP-Affiliate?
    5. iDev Affiliate and WP eStore Integration

Tags:

  • jam
  • Jam affiliate integration
  • JROX
  1. amin007
    Key Master

    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);

    2. Open the "eStore_payment_submission.php" file and find the following function:

    function eStore_get_custom_field_value1()

    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.

    3. 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['mc_gross'];
    $trans_id = $this->ipn_data['txn_id'];
    $jrox_cookie = $customvariables['jrox_cookie'];
    $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);

    Don't forget to change "www.mydomainname.com" with your own domain name.

    That should do it.

    Posted 2 years ago #
  2. thomas
    Member

    JAM integration! Is there a way to award the affiliates via manual chechout as well?
    Can you post that code and where to place it?
    Thanks a lot!

    Posted 1 year ago #
  3. amin007
    Key Master

    In the "eStore_payment_submission.php" there is a place for awarding commission to "WP Affiliate Platform" so search for the following comment in that file:

    //Award Affiliate Commission

    and replace the commission awarding of "WP Affiliate Platform" to do the JROX Affiliate awarding. The following bit of code should do it.

    $sale_amt = $_SESSION['eStore_cart_sub_total'];
    $trans_id = "";//Use some unique ID
    $jrox_cookie = $_COOKIE['jrox'];
    $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);

    Posted 1 year ago #
  4. thomas
    Member

    Thank's amin!
    It's working, but:

    1.Error:
    $this->debug_log('Awarding JROX affiliate commission.',true);
    The "eStore_payment_submission.php" file dosen't know the debug_log and I think, the "$this" is not allowed at that code-position.
    Please Help!

    2.Send custum variables to Jrox:
    Jrox-Jam has up to 5 custom variables like "$jrox_svalue_1"
    I need to submit the "customer_email" to JAM.
    That's the only way to identify the affiliate, when a customer doesn't transfer the money.
    Please help me with that !
    Thank's Thomas

    Posted 1 year ago #
  5. thomas
    Member

    My solustion is running, except the "debug-thing"!

    What I did:

    <br />
    // Start - Award Jrox Affiliate for Manual Checkout<br />
    $sale_amt = $_SESSION['eStore_cart_sub_total'];<br />
    $trans_id = "Bank-Manuell";<br />
    $jrox_cookie = urlencode($_COOKIE['jrox']);<br />
    $payer_email = $_POST['customer_email'];<br />
    $JAMIntegrate = file_get_contents("http://www.mydomain.com/affiliates/sale.php?amount=".$sale_amt."&trans_id=".$trans_id."&custom_mid=".$jrox_cookie."&jrox_svalue_1=".$payer_email);<br />
    //$this->debug_log('Awarding JROX affiliate commission.',true);<br />
    // End - Award Jrox Affiliate  for Manual Checkout<br />

    First, I needed to "urlencode" the cookie, to get the cookie-information into Jrox-JAM. (before I got only the affiliate-ID but not the rest (adtracker-info, referrer-website)
    Second, I avtivated the custom_variable in JAM (system integration) for the "customer_email_address".
    Third, I added the code-elements for the $payer_email

    Now I need to change that in paypal.php for paypal-payment as well. But that should be no problem anymore.

    Greetings,
    Thomas

    PS: Be careful with custom-values where the content can include "space" (eg. name). You need to trim that. Otherwise you get an ERROR.

    Posted 1 year ago #
  6. amin007
    Key Master

    Okay when I copied and pasted the code I made a little mistake :)

    The following line should not be in the "eStore_payment_submission.php" file:

    $this->debug_log('Awarding JROX affiliate commission.',true);

    That line is in the "paypal.php" file to output information to the debug file.

    Posted 1 year ago #
  7. julien

    Hello, i tried to make the edits but it doesn't work,

    i'm unsure about where to pleace each piece of code, can you please provide the php files ?

    Posted 1 year ago #
  8. amin007
    Key Master

    Did you change the "http://www.mydomainname.com" to your own domain name? Sometimes users miss this step.

    Anyway, I sent you the files.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ Forum is proudly powered by bbPress

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin