Shared Affiliate Products through one transaction

Here’s a unique situation.



I have a scenario that the cart will have many affiliates (they are actually fundraisers programs for organizations).



When an affiliate sends traffic into the cart from their Affiliate banner, the commissions are working fine for that affiliate.



What I need to happen is that when affiliate commerce happens, and a product(b) that is not associated to the group also is picked up in the transaction, that they do not get the commission, but the OTHER affiliate the product(b) is associated to gets the commission.



SO:



AFFILIATE A / AFFILIATE B



Each have individual products associated to their PRODUCT BASED AFFILIATE PLAN



AFFILIATE A sends traffic to the cart from their banner.

Send traffic to the Individual product in the plan.



Product is added to cart.



Shopper than looks in different part of the store and adds Product from cart that is also associated to AFFILIATE B.



Transaction.



Commission needs to show:



AFFILIATE A Gets Commission on the product associated to their plan



AND



AFFILIATE B Gets Commission on the product associated to their plan. even though they didn’t send the traffic through their own site.