Hi Jliu,
This is something that I have had to create for a site that I designed that is running EE. What I needed was a way to have (in my case) songs for teaching children in schools their subjects and each song has many files associated with it such as mp3 files, pdf files or music scores and so on and so forth. To do this I first of all had to have people pay for the songs which I handled by utilising the excellent Mals E-Commerce shopping cart to allow the user to add items to a cart. The person needs to be logged in first so they have to create an EE user account first before the buy now links appear so that I can grab their user ID to use to store so that I know what they have purchased. Once they have paid using Mals-E then it calls a hidden script on my server and adds them to table that I created to store the persons EE user ID and the id of the song (EE entry) that they had purchased. This information could then be used in a downloads section to only bring back the items that the person has access to.
I couldn’t use the Simple Commerce module for this as, well, the site is certainly not simple as each song (entry) can be purchased in many different ‘formats’ as in a teacher gets more files than a parent for instance so this needed to be catered for also and I didn’t want to go creating loads of duplicate songs (entries) to handle this but this is pretty much what I did to handle that part.
I then used Linklok URL to handle the secure downloads so that the user couldn’t possibly find out where the files are stored and guess at file names. It also allows me to IP lock the links to their computer so that they can’t pass on the links and also apply a time limit to when they must download the files.
Phew…
It was quite a bit of customisation and a lot of work but well worth it in the end as using EE made it exceptionally robust.
This is just the way that I did it though and I’m sure that once the full EE commerce module comes out then a lot of this should be a whole lot easier, hopefully!!
Hope that helps though for the meantime.
Best wishes and good luck with it all.
Mark