Commission bracket calculation

Posted in

Hi,

I understood that I could follow this to create a custom referral method.

However, what I need is to use Affiliate pro for woocommerce to calculate the commission based on the sales numbers. Different level of sales would give different commission incentives.

For instance,

0<=sales 0 commission
100<=sales 5% commission
200<=sales 10% commission
300 15% commission

So a monthly sale of 500 would generate (200-100)*5%+(300-200)*10%+(500-300)*15%=5+10+30=45 of commission.

How could I achieve this with the Affiliate Pro?

Thank you for your help. Much appreciated!!

14 Responses to Commission bracket calculation

  1. Afzaal October 12, 2013 at 3:53 pm #

    Reading this post made me convert and buy! Plugin seems awesome, about to install now. Quick question:

    Is there a way to offer this variable commission structure but have it reset every month. So say the 1st of every month the affiliates commission will drop down to the base rate. This’ll help keep people on their toes 🙂

    Looking forward to your response.

    Afzaal

    • antonio October 17, 2013 at 8:36 am #

      Hi,
      you can use Affiliates API and create you own commissions system.
      cheers

  2. uk October 9, 2013 at 5:23 am #

    Thanks, Antonio.

    I noticed there is this “Affiliates” tab in the Product page, it reads


    Referral Rate________Product referral rate for affiliates.

    Examples:
    Indicate 0.1 for 10% commissions on this product.
    Indicate 0 to exclude this product from commissions.
    Leave empty if no product referral rate should be applied (default setting).

    Do I need to enter anything here? I am using ACM to calculate the commission.

    thanks,

    • antonio October 9, 2013 at 5:33 am #

      Hi,
      if you are using Custom Method by Sales, you don’t need to enter anything in product page, because the plugin doesn’t use these values.
      cheers

      • uk October 14, 2013 at 5:32 am #

        Thank you, Antonio.

  3. uk October 7, 2013 at 6:16 am #

    Thank you, Antonio.

    I noticed this in the sample code,

    /*
    * In this case:
    * 0 <= num_referrals <= 30 rate= 25%
    * 30 < num_referrals <= 100 rate= 20%
    * 100 0.25,
    ‘100’ => 0.20
    );
    public static $max_rate = 0.10;

    which means the calculation is based on 0<= referrals ($) <= 30, and then 30 < referrals ($) <= 100, so on and so forth.

    However, our calculation is based on 0<=referrals<30, and then 30<=referrals<100.

    In such a case, do I need to modify the code a little bit?

    And, how do I integrate this code with Affiliate Pro?

    Sorry for the silly questions.

    Thanks,

    • antonio October 7, 2013 at 8:18 am #

      Hi,
      use 29 instead of 30, it’ll be: 0<=num_referrals <=29 is similar to 0<=num_referrals<30.
      You must download this plugin, install the plugin, and select "ACM::By_sales" in Affiliates->Settings.
      cheers

      • uk October 8, 2013 at 4:28 am #

        So in my case,

        * 0 <= num_referrals <= 49 rate= 0%
        * 50 < num_referrals <= 149 rate= 5%
        * 150 <= num_referrals <= 499 rate= 7.5%
        * 500 <= num_referrals <= 999 rate= 9.0%
        * 1000 <= num_referrals <= 2499 rate= 10%
        * 2500 <= num_referrals <= 4999 rate= 12.5%
        * 5000 0,
        ‘149’ => 0.05,
        ‘499’ => 0.075,
        ‘999’ => 0.09,
        ‘2499’ => 0.1,
        ‘4999’ => 0.125
        );
        public static $max_rate = 0.125;

        Am I using the syntax and calculation correctly?

        Thank you,

        • antonio October 8, 2013 at 5:11 am #

          Hi,
          in your case:

          public static $rates = array(
          '49' => 0,
          '149' => 0.05,
          '499' => 0.075,
          '999' => 0.09,
          '2499' => 0.1,
          '4999' => 0.125
          );
          public static $max_rate = 0;

          $max_rate is used when num_referrals is greater than the last value (for example: 6232)
          cheers

          • uk October 8, 2013 at 5:28 am #

            Antonio, thanks for the quick response.

            I am not sure if any of the contents I posted got stripped. for any sales that is > 5000, the commission rate is 12.5%. Is this covered with the code?

            thanks,

            • antonio October 8, 2013 at 5:33 am #

              Sorry, then use:
              public static $max_rate = 0.125;

  4. uk October 6, 2013 at 6:23 pm #

    Thank you, Antonio.

    I am not a programmer. Could you please shed some lights on what I need to customize to make it work for sales ($) based commission calculation? I see that the one you referred me to is calculated based on number of referrals?

    Thank you,

    • antonio October 7, 2013 at 5:55 am #

      Hi,
      this is based on number of referrals (sales). In your case, you must change:

      public static $rates = array(
      '30' => 0.25,
      '100' => 0.20
      );
      public static $max_rate = 0.10;

      by

      public static $rates = array(
      '100' => 0,
      '200' => 0.05,
      '300' => 0.10
      );
      public static $max_rate = 0.15;

      cheers

  5. antonio October 6, 2013 at 3:48 pm #

    Hi,
    you can use Affiliates Custom Method by sales. You must custom it with your values.
    cheers

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share