Is Affiliate Plugin setup to track residual commissions?

I am confused on how the affiliate payment structure is setup. Since the sites are set to auto renew every month will the affiliate commission be calculated for the referring affiliate on an ongoing basis? I would want to pay a residual commission for each renewal period.

  • aecnu
    • WP Unicorn

    Greetings jasonverdelli,

    I am confused on how the affiliate payment structure is setup. Since the sites are set to auto renew every month will the affiliate commission be calculated for the referring affiliate on an ongoing basis? I would want to pay a residual commission for each renewal period.

    Though I am not sure which plugin you are referring to having this integration with, but my answer will assume Pro Sites.

    From the best of my knowledge it is a one off commission and not recurring.

    I will happily get lead developer clarification once I know specifically what product we are referring to i.e. Affiliates for Pro Sites plugin? Membership plugin? etc.

    Please advise.

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings jasonverdelli,

    I totally agree with you and I firmly believe that it is one off for Pro Sites while at the same time it is recurring for the new version of the Directory plugin (incorporated by a different developer).

    Of course if I am wrong it is sure the lead developer is going to correct me when he sees the request.

    Therefore we should make the feature request that Pro Sites affiliates integration is made to be recurring.

    I shall move this ticket to feature requests, notify the lead developer of the request, and please use the red banner in the bottom right hand corner titled Request a new plugin, theme or service to make a feature request there as well.

    Thank you for bringing this up.

    Cheers, Joe

  • digitsoft
    • The Crimson Coder

    @jason & Joe – I like the idea of recurring – not only for Pro Sites, but any other aspect. I don’t know if it handles recurring for Membership or Directory – does it?

    @jeff – coding recurring into this would be an undertaking for sure. I think the developer may be looking at this thread and with all luck recurring will make it onto the enhancements list.

    Anyway…I personally use several different methods for aff tracking (plugin and non-plugin) that support recurring billing and affiliate payouts. For example – 1shoppingcart handles everything – payments, affiliates (recurring too), etc..,. I always pick the best tool for the job regardless of source…no need to jam square pegs into round holes :wink:

    There’s definitely room for improvement with the current Affiliate plugin, but as an affiliate plugin it works.

  • Jeff Hoffman
    • WPMU DEV Initiate

    Looking at the code, if AFFILIATE_PAYONCE is true, a flag gets added to the affiliate’s metadata to indicate that they’ve been paid.

    If AFFILIATE_PAYONCE is false, that flag is not set. Presumably, the next time the purchaser makes a payment, the affiliate would be paid again.

    I’ll keep digging, but when the developer reads this, it’d be nice to get confirmation that this will work as I’ve described. There may be hidden “gotchas” that I haven’t uncovered, yet.

    @digitsoft – I’m familiar with 1ShoppingCart, InfusionSoft, OSIAffiliate, etc. None of those are integrated with Pro Sites. So, I’m faced with either (1) adding recurring payments to the Affiliate plugin, or (2) integrating InfusionSoft with Pro Sites. Six of one, half dozen of the other.

    Thanks,

    Jeff

  • aecnu
    • WP Unicorn

    Greetings jasonverdelli,

    As you can see sir he has not yet made it in here yet but I will ping him again this time to look at the code mentioned above and answer your question – though he was originally pinged as a feature request for recurring.

    Cheers, Joe

  • Barry
    • DEV MAN’s Mascot

    The affiliate plugin itself basically only records clicks itself. All of the guts of the integration with the other plugins and systems are in the add-ons (I originally wrote gateways, but i mean’t add-ons), which are in the affiliateincludes/addons directory.

    The relevant add-on will hook into the other plugin and then tell the affiliate plugin to add a signup / purchase / credit / debit etc based on what is happening.

    So to get a recurring payment, you’d need to hook into the payment receiving part of the plugin and add a credit to the affiliate based on that amount.

    The initial add-ons set a user flag to indicate that a user has already been paid, this is because the included add-ons are deliberately set to only payout on the initial sign up.

    Removing this flag set and check, and some other tweaks (I’ve not looked at the add-ons for a while, so not 100% sure what) should have the recurring credits being added, and the main affiliate plugin will handle the rest.

  • ffdltd
    • Design Lord, Child of Thor

    Recurring payments would be a huge positive for this plug-in. Or even better if you could set it so it could pay out for say the first 6 months (or whatever you set it to) as an incentive to get people to promote and earn on memberships.

    Cheers.

  • Barry
    • DEV MAN’s Mascot

    Recurring payments would be a huge positive for this plug-in. Or even better if you could set it so it could pay out for say the first 6 months (or whatever you set it to) as an incentive to get people to promote and earn on memberships.

    It already handles it, you need to set the configuration option to have the plugin not ignore any payments after the first one.

  • aecnu
    • WP Unicorn

    Greetings ffdltd,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • ronsmart
    • The Incredible Code Injector

    Cool thanks for getting back to me right away. So all I have to do is add:

    if(!defined(‘AFFILIATE_PAYONCE’:wink:) define(‘AFFILIATE_PAYONCE’, ‘no’:wink:;

    to wp-content/plugins/affiliate/affiliateincludes/includes/config.php

    correct?

  • aecnu
    • WP Unicorn

    Greetings ronsmart,

    To the best of my knowledge the answer would be to change this line : define(‘AFFILIATE_PAYONCE’, ‘yes’:wink:;

    By this line : define('AFFILIATE_PAYONCE', 'no');

    This define line is on ==> Line 8: /affiliate/affiliateincludes/includes/config.php

    Cheers, Joe

  • Spencer
    • Design Lord, Child of Thor

    if you could set it so it could pay out for say the first 6 months (or whatever you set it to) as an incentive

    Apart from setting the ‘affiliate_payonce’ to ‘no’ how would one specify a time-frame or limit on how long an affiliate receives recurring income?

  • revolution
    • Design Lord, Child of Thor

    Hi everyone! If I want to pay by percentage where I should add it in the next code and in what format (50 or 50%) and do I have to add an amount also?

    case '1':	$supporter_1_payment_type = $getoption( "supporter_1_payment_type", 'actual' );

    $affamount = $getoption( "supporter_1_whole_payment", 0 ) . '.' . $getoption( "supporter_1_partial_payment", 0 );

    if($supporter_1_payment_type == 'percentage') {

    $floatpercentage = floatval( $affamount );

    $floatamount = floatval( $periodamount );

    // We are on a percentage payment so calculate the amount we need to charge

    if($floatamount > 0 && $floatpercentage > 0) {

    // We have a positive value to check against - need to check if there is an affiliate

    $amount = ($floatamount / 100) * $floatpercentage;

    $amount = round($amount, 2, PHP_ROUND_HALF_DOWN);

    } else {

    $amount = 0;

    }

    I’m want to pay 50% on all my subscriptions

    Tahnks

  • Barry
    • DEV MAN’s Mascot

    Apart from setting the ‘affiliate_payonce’ to ‘no’ how would one specify a time-frame or limit on how long an affiliate receives recurring income?

    It would require custom coding as a timeframe isn’t currently part of the plugin, it has option for pay on the first purchase, or pay on all of them.

  • Brian Durost
    • Recruit

    Barry,

    Can you confirm by changing the following code that it will track commission for a residual sale – for example, a monthly Pro Site upgrade.

    define(‘AFFILIATE_PAYONCE’, ‘no’:wink:;

    This define line is on ==> Line 8: /affiliate/affiliateincludes/includes/config.php

    Thank you.

  • Barry
    • DEV MAN’s Mascot

    Can you confirm by changing the following code that it will track commission for a residual sale

    Yes, it will add a commission everytime a payment is received by pro-sites.

    If you want it remain across upgrades, then place the define in your wp-config.php file

  • Barry
    • DEV MAN’s Mascot

    Barry, Where do we find this, in the Affiliate Settings or Pro Site?

    Pro sites -> Settings. Under the heading of Affiliate Settings.

    All the plugin relevant options for affiliates are in the settings areas of the relevant plugins.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.