Commission bracket calculation

by

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!!

Posted in

Comments

14 responses to “Commission bracket calculation”

  1. 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

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

  2. 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,

    1. 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

      1. Thank you, Antonio.

  3. 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,

    1. 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

      1. 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,

        1. 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

          1. 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,

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

  4. 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,

    1. 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. Hi,
    you can use Affiliates Custom Method by sales. You must custom it with your values.
    cheers

Share