Sales Tracking Code Implementation Cs-Cart V3

CS-Cart V 3

I have recently done tie up with an affiliate company. Now I want to have the sales tracking for various products in different categories. it is a CPS Campaign (COST PER SALE)



Earlier it was flat % for every product in every category but now the commission I have to give to them against the order is 5,10,20% respectively.



The commission I have to pay is different for categories. Hence I want to implement the tracking system in which if the ordered product is from



Category 1, Category 2



the below mentioned code is triggered:







Incase of Category 3, Category 4, Category 5, Category 6

the below mentioned code is triggered:





and Incase of Category 3, Category 4, Category 5, Category 6

the below mentioned code is triggered:

Category 3, Category 4, Category 5, Category 6





NOTE:

Please pass/fetch a unique value (Sale amount/Order ID/ Item No) in the
adv_sub=SUB_ID&amount=AMOUNT tab at the tracking code for SALE campaign.


How can I implement this please help any one.

any help