I have a two part question about customizing my Magento store.
When someone buys a downloadable product, I want to generate a licence code and include it in the invoice.
I have added a product attribute called ‘license_code’ to my product’s default attribute set and I want to set its value with php when a customer checks out.
Which event do I need to observe to let me access the products in the cart just after they are purchased but before the invoice is created?
Also, what script do I use to set a product’s attribute value durring that event?
Thank you for your help!