DesignByOnyx
-
2/3/2011 3:27:03 PM
RE:E-commerce downloadable products
I know this is old, but figured I'd put this out there. I had to do this for a customer, and it was a bit of an undertaking. Our business rule was that the file could be downloaded only ONCE per order, and that we had to know that the last byte was actually downloaded before flagging the file as downloaded. Here is a high level overview of what we did:
- Used the Media Library to store all the files
- Created products which had a field for "Associated Media File", which tied the product to it's corresponding file in the Media Library.
- We built a custom download manager, which is necessary in order to determine when the last byte of data gets downloaded. After the last byte is delivered, a custom url was called, passing the order id and product id. This would allow us to flag the order items as truly downloaded.
- We customized the behavior of "getMediaFile.aspx" to handle product downloads and trigger our download manager, or show an error if the file had already been downloaded.
Hope that helps.
|