Affiliate commision not calculated correctly?


  • Default avatar
    christos    
     11 years ago
    0

    Hi Seyi,

    Today we noticed the following:

    We had the following order of some items:

    Price Qty Tax Discount Total
    50,40 € 2 17,14 € 0,00 € 117,94 €
    50,40 € 2 17,14 € 0,00 € 117,94 €
    Subtotals 34,28 € 0,00 € 235,88 €
    Coupon Discount - 23,59 € (ok this is again wrong, should be 17.23, see also my other post on the wrong discount amount before tax)
    Shipping 5,23 € 35,98 €
    Total 36,07 € 0,00 € 248,27 €

    The affiliate has a commision of 10%, i.e. he should get: 4 * 50,40 * 0.1 = 20.16 € (ofcourse the commission is calculated before tax)

    We noted though that the affiliate has been credited with 21.23 € in his panel. Is there smth wrong with the calculations? Would appreciate your comments!

    Thanks in advance,
    Chris
  • Your avatar
    seyi    
     11 years ago
    0

    For affiliates, there is 2 types of commissions you can select from:
    -> Order total
    -> Order total - shipping

    I assume you selected ordertotal - shipping, which comes to
    248.27-35.98 = 212.29
    212.29 * 0.1 = 21.229
  • Default avatar
    christos    
     11 years ago
    0

    Thanks seyi,

    Basically we can see the following commission types:

    -> Order Total
    -> Order Total no shipping

    We had selected the order total no shipping (because it seemed that shipping is not included!). We will select the order total and let you know ;)

    Rgrds,
    Chris
  • Your avatar
    seyi    
     11 years ago
    0

    Order total will take the total including shiping, in which case the commissions will be 24.827. If you want to alter the commisions calculation, you can in
    www/administrator/components/com_awoaffiliate/helpers/estore/[your_store]/commissionhandler.php
  • Default avatar
    christos    
     11 years ago
    0

    Hi seyi, thanks for the information and suggestion. We suggest to add an additional commision calculation which is more fair to the storekeeper, and this is why:

    In the above case, the net income of the shop from the order is 201.6-10% discount = 181.44. The commission of the affiliate should be calculated on this untaxed net income, i.e. his commission should be 181.44×10%=18.14. But currently (in the order-shipping method), awoaffiliate calculates the commission to 21.23 which is actually 18.14+17%. Practically the commission is multiplied by the tax rate which is unfair for the storekeeper. Therefore we suggest this way of calculation (untaxed product totals - discount) to be added in awoaffiliate also ;)

    would appreciate your comments

    rgrds,
    chris
  • Your avatar
    seyi    
     11 years ago
    0

    Hi Chris,

    This only works well for users who are using discount before tax. If you are using discount after tax, then its not possible to separate the discount on a product before tax.
    In the file I mentioned, commissionhandler.php, around line 28 is this:
        CONCAT(ou.first_name," ",ou.last_name) buyer_name,ou.email as buyer_email


    change it to this
        CONCAT(ou.first_name," ",ou.last_name) buyer_name,ou.email as buyer_email,o.order_billTaxAmount


    And around line 43 is this
    <?php
        
    elseif($row->commission_type=='product_total'$total $row->order_total-$row->order_shipment-$row->order_shipment_tax;
    ?>


    change it to this
    <?php
        
    elseif($row->commission_type=='product_total'$total $row->order_total-$row->order_shipment-$row->order_shipment_tax-$row->order_billTaxAmount;
    ?>


    Now when using the 'Order total - shipping' option, you should get the desired effect.