I need to send the commission to a new payment gateway and I need a way to calculate it to take into consideration all posbilities that cs cart multivendor uses:
- commsion categories
- vendor plan commision
- shipping cost
- taxes and so on.
In the admin panel at “Accounting” > “Transaction” > “Transaction value” is displayed and calculated correctly the commision but I don t know the algorithm and all what it implies to calculate it.
Could you help me wih this?
You check the
\Tygh\VendorPayouts::update (app/Tygh/VendorPayouts.php) method for the details of what data is being stored into the transaction.
I hope it will help you.
@CS-Cart_team I don t see where is calculated the commision, it is just payouts…
I am interested in commision, I see it listed on columns “Transaction value” eg. 15.00 lei
out of 175.45 lei see row 2 on here commision — ImgBB
Commissions are the part of payouts, and stored in the
commission_amount column of the
?:vendor_payouts table, which is being filled in the mentioned method.
If you need to check the calculation of the
commission_amount exactly, please take a look at the
fn_calculate_commission_for_payout function (app/addons/vendor_plans/func.php), look for the
$payout_data['commission_amount'] variable there.
Thank you for the excellent details!