Where it sits
In two places, both with the same content. The text sits in a field you can copy from, so you can paste it into a reply.
For every order the plugin writes down how it calculated: which rates were in play, which one won and why. This chapter reads that log line by line and describes every branch it can take.
In two places, both with the same content. The text sits in a field you can copy from, so you can paste it into a reply.
Order 10024 from the demo shop, €235.21 of revenue, result €11.76. The partner has a rate of 10 percent but receives 5. Why, is in the log.
calculation commission for order - id: 01a06496e4087167a5d076249c9abfc7 - number: 10024 - tax status: gross - level: 1 -- reading if order is subsequent order -- -- looking for previous commissioned order for customer -- -- previous order with redeemable commission found - order number: 10013 - is subsequent order: true -- is subsequent order: true -- firing commission calculator pre-calculation event -- switching by commission type - affiliate commission type: percental -- -- individual commission disabled by configuration - configuration individualProductCommissionStatus: false -- -- calculating commission rate -- -- -- calculating static commission rate - customer commission: null - product commission: null - category commission: null - product stream commission: null - subsequent commission: 5 - affiliate commission: 10 - configuration commissionPriority: default -- -- -- sorted and filtered rates: Array ( [0] => 5 [1] => 10 ) -- -- -- selecting default/first rate by priority - rate: 5 -- -- commission rate calculated - rate: 5 -- -- calculating commission - order amount: 235.21 -- -- commission calculated - commission: 11.76 -- commission calculated by commission calculator - calculated commission: 11.76 -- firing commission calculator event -- commission possibly re-calculated due to fired event - calculated commission: 11.76 -- calculated commission: 11.76
The indentation with dashes carries the nesting: the deeper the line, the further inside the process. The top level are the steps, the second their sub-steps.
calculation commission for order - id: … - number: 10024 - tax status: gross - level: 1
If buyer and partner are the same customer and commission for own orders is switched off,
the calculation ends immediately at zero. The log then reads
self commission disabled by configuration followed by calculated commission: 0.0.
The plugin looks for an earlier order with a redeemable commission for the same customer. If it finds one, it notes the order number and sets the case to true.
If the order is a follow-up order and follow-up orders do not earn a commission, the calculation ends here at zero. This is the setting that turns the commission into a one-off bonus per customer won.
switching by commission type - affiliate commission type: percental. From
here a different calculator runs depending on the type, and the log lines below differ.
The rates on customer, product, category and dynamic product group hang on a single
setting, not on four. While it is off, the calculation skips all four and records it:
individual commission disabled by configuration - configuration individualProductCommissionStatus: false.
All candidates are collected in an order wired into the code. Rates that are not set
appear as null in the log and then drop out; the order of the rest is preserved.
In the example, [0] => 5 and [1] => 10 remain after
filtering: the follow-up rate in front of the partner rate.
Only now does the setting Priority for several commission rates pick which of the remaining rates wins.
The most common mix-up. "Highest priority" means the position in the order, not the size of the rate. That is exactly why the partner gets 5 instead of 10 in the example: the follow-up rate stands in front of the partner rate. Whoever really wants the largest value every time chooses "Highest commission rate".
If a product sits in several categories or in several dynamic product groups, there are several candidates inside that one source. Two settings of their own resolve it before the value enters the big order.
calculating commission - order amount: 235.21 and below it
commission calculated - commission: 11.76. The order amount is the net goods value excluding
shipping; the tax status from the header line determines how it is established.
One event fires before the calculation and one after. The log records both and states the value again afterwards, so it stays visible whether a listener changed it.
Everything on this page is generated straight from the plugin configuration. When a setting changes in the plugin, this page changes with it.
Yes, completely. The plugin writes a log of the calculation onto every order, line by line, with every intermediate value. You open it in the partner file under Statistics, Orders through the context menu of the row with "Show log", and equally on the order itself in the Commissions tab. It answers not only how much, but why.
In a fixed order wired into the code: customer, product, category, dynamic product group, follow-up order, partner. Rates that are not set drop out, and the order of the rest is preserved. Only then does the Priority setting decide which of them wins.
It means the position in the order, not the size of the rate. The first rate that is set in the fixed order wins, so in case of doubt the customer rate, and the partner rate last. Whoever really wants the largest value chooses "Highest commission rate". This mix-up is the most common source of error during setup.
Because another rate stood in front of it. With a follow-up rate of 5 percent and a partner rate of 10, the priority "Highest priority" picks the 5 as soon as the order has been recognised as a follow-up order. The log shows exactly that step.
When an earlier order with a redeemable commission already exists for the same customer. The plugin looks for one and writes the order number it found into the log. Guest accounts are excluded: for them an order is never a follow-up order.
The calculation stops immediately at two points. First, when the buyer and the partner are the same customer and commission for own orders is switched off. Second, when it is a follow-up order and commission for follow-up orders is switched off. Both stops appear in the log with their reason.
No. A single switch, "Activate individual commission for customers, categories, products and dynamic product groups", releases all four together and is off out of the box. While it is off, the calculation skips those four sources entirely and the log records that.
Then a second priority applies, separately for categories and for dynamic product groups. Both stand at "Highest commission" out of the box. They resolve the conflict inside one source before the resulting value enters the big order.
Yes, through two events. One fires before the calculation, one after; the log records both and states the value again after the second one. Your own code can change the commission that way without touching the plugin.
On the order, as long as the setting "Log the commission calculation for every order" is active. It is on out of the box. Without it, a question can only be answered by guessing, so it should stay on.