close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Restricting possible downloads

Thread began 11/18/2010 7:59 am by henrik.schlegel400884 | Last modified 1/03/2011 4:28 pm by henrik.schlegel400884 | 1674 views | 14 replies

Jason ByrnesWebAssist

no, there is not a more detailed tutorial for this.

first lets look at restricting number of downloads:

In the Orderdetail table, you will need to add a new column for the download count, set the default value to 0.

On the download_center.php page, you will need to add another condition to the where clause of the WADAorderdetails Recordset, lets say you want to limit the download to 5, and have named the download count column "downloadCount":
AND orderdetails.downloadCount <= 5

to update the counter, you will need to add an additional hidden form element to the download form, name it "prodID". Set it's value to use the ProductID column of the WADAorderdetails recordset.

Now in the Download file server behavior, check the option to update the download count.

Set the table to use the oredersetails table.

the key column to the DetailProductID.

Click the lightning bolt next to key column value and select the prodID hidden form element.

For the count Column select the downloadCount column.

You will want to make sure that the download file server behavior is before the WADAorderdetails recordset.


Now lets look at restriction by date:

Again you should add another column to the order details table for the expiration date.

at the time of order, you will need to calculate when the file download should expire, and update the store order details behavior to store the expiration date in that column.

you can then modify the WADAorderdetails recordset to ensure that the currant date is before the expiration date by adding another condition to the where clause.

AND orderdetails.expirationDate >= now()

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...