Great question — answering as the UphillTech team:
I'm not sure I fully understand your question, but if you want to track affiliate orders I'd suggest using Cookie object in PrestaShop, hook into actionFrontControllerInit , check for $_GET params, and if you see one for the affiliate just write it to Cookie .
Full answer by Krystian Podemski: https://stackoverflow.stackexchange.com/a/64233908 (CC BY-SA 4.0).
Need it done for your business? UphillTech.