Would appreciate your help here.
I'm trying to have my affiliate commission affected by the discounts/vouchers of the products in the cart. I have changed:
to$data['commission'] = ($subtotal / 100) * $affiliate_info['commission'];
Which worked great until I encountered my issue: the VAT calculation is also added to the total value. Now I would like to subtract the VAT value from the calculation but I cannot seem to find the correct value for this.$data['commission'] = ($total / 100) * $affiliate_info['commission'];
Any suggestions?