I'm having a strange problem with the insert of orders related to affiliates. When it inserts an affiliate sales it places two records into the database. The first has all information correct except the order id it uses 0, where as the second insert has all the correct information. Now if someone else places an order using that same affiliates id it gives an error:
Why am I getting this double insert, I only see it calling that part once. And why is the first one always 0 for the order id?
Thanks for any help