Per Ryan's suggestion, I'm posting a new thread regarding the goal of integrating CPiLL's File Product module into the Ubercart Core. CPiLL has given me permission to take over development of his module, since I've added at least one feature and changed some of the functionality of his original code. See the contrib thread here: http://www.ubercart.org/contrib/145
Here's a list of features I'd like to include in the module going forward, and my thoughts / status on them.
- File Products are based on SKU / model, not on purchase or fpid (relationship in database). I have customized my version of the File Product to allow files to be updated independently of the product / model in question. The user is able to visit "My Files" to view an up-to-the-minute list of all files associated with every product they have purchased. I also incorporated a jquery "show-and-hide" script to allow for a collapsible, accordion-like list, to prevent clutter.
- Anti-leech checking - IP and uid based. I have coded a function that tracks each IP address the user has downloaded files from. When a threshold is surpassed, it should trigger a warning in watchdog, logout the user, and change their password - then send an email to the email address on file, making user aware a potential leeching or hacking attempt was logged on their account. Should flag the administrator for review. (Can be disabled if needed, and threshold configurable in the store admin). I have this mostly completed.
- Option: Number of clicks / days before expiration. As an alternative to the "unlimited downloads / anti-leeching" scheme, allow a certain number of times for the file to be downloaded, or number of days before their product expires, whichever comes first. The major downside with the Number of clicks method is you can't use download accelerators or managers, as it causes the link to expire prematurely.
- Add-to-user function. Would like the ability to add a product to a user (for instance if they "win" a downloadable file as a result of a contest, or request). This might be more suitable for Ubercart core - being able to skip the process of adding an order to a user, and then adding products to that order. This would shorten the process considerably. (This might just be better left to adding an order to a customer, as it is now).
- Send links via email when a new purchase is made. Self-explanatory; check to see if downloadable products were purchased. If so, add the links to the user's order complete email. Can either be a link to mysite.com/my_files or to the file/*/download URL.
That's all I have for now. As I've mentioned I'm pretty well on my way to having the major features completed for use on my project site. But I'm more than happy to help code and brainstorm ideas as the process of integrating this awesome module into core continues.
If you'd like to see my code, let me know and I can paste it in here, along with my database structures and all the other necessary info (screenshots, JS, etc.)
Erik








Joined: 08/14/2007