Calculate commissions with discount coupon

Posted in

In the example of an affiliate:
Allocate a 20% commission on all sales,
If he has a coupon to give to the affiliate’s followers for 10% discount

Is it possible to calculate a commission minus the coupon discount? On orders where your coupon has been used?

If he has sales without the coupon the commission is 20%.

Thank you for your cooperation
Rui

One Response to Calculate commissions with discount coupon

  1. George November 19, 2021 at 9:51 pm #

    Hi Rui,

    Welcome back to our support forum.

    The commission rate you mention in your example is a percentage and as such the commission will be a proportion of the sale total.
    For example assume that the sale was referred via an affiliate link and the total is 100USD. The commission in this case will be 20USD for the referring affiliate.
    On the second case assume that the sale was referred via an affiliate coupon -20% and the total is 100USD – 20USD = 80USD. The commission in this case will 16USD for the referring affiliate.

    Still though if you wish to adjust the commissions even further ie whenever a coupon is used then you should have a look at Formula-based rates and the filter hook affiliates_formula_computer_variables which gives you the flexibility to adjust the final commission rate the way you like. The third parameter of the filter hook, $context, is an array which also includes the $order_id, giving you freedom to check the contents of a referred order, including coupons and decide what the commission should be according to your requirements.

    Kind regards,
    George

Only authorized members can comment on this topic.

Log in

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