Hi Nicolas,
I understand that. Thank you.
I have two php code snippets that can be used to:
- generate a unique download code.
- construct a download page (front-end module) where the customer can enter the unique code to download the file ordered.
Here's how it works:
code generation:
When an order changes status to confirmed, instead of the current link that is put in the mail, the script generates a unique download code and stores this code in a new table called downloads alsong with the file associated with this order and some variables like expiration time/date, # of downloads.
If there are more items in this order, the scipt depends on the order item iteration in the the current code and generates a code for each order item.
The unique code(s) is/are then put in the e-mail that goes to the customer.
downloading
The code that constructs the downloadpage, handles the download. When the user enters the unique code here, the scripts checks it's validity in the table, how many times the file may be downloaded, expiration time, and if all are valid, offers the download and updates the table.
Pretty straightforward.
Can you tell me where your code currently generates the download link?
I do have decent PHP and MySQL programming knowledge and experience and want to create the above in some overrides.
Thank you,
Maurice