Selling downloads – How I got it working
Since there is not much info available on how to make the magic of automated-download-access work, I'll post roughly how I did it.
1. Create a commerce product as usual and add a "Commerce File" field (from the Commerce File module). There you will have to specify a private location for the stored downloadfiles since they will be protected.
2. Set permissions for the customer role (e.g. auth. user): "Access own commerce file license"
3. Do two rules:
(a) On payment success >> Issue licenses for files in the order
(b) On requesting a download >> condition: user has role [e.g. auth. user] >> Allow download
The second rule took me a few days to figure out because you can't set it in the shop-rules. Go to the general rules and create it there. I have tried to allow downloads on payment success or whet the license was issued but that doesn't work.
The customer process now works like this:
Anonymous user puts product in the cart.
Recieve email with login
Click on "Files" tab. Klick on the listed file > downloading...