Shopping cart software Wordpress Responsive Design Dreamweaver CSS Generic Version Developer License Updaters Store Tools Shopping Cart Mobile

Call sales now USA sales 1-718-887-7598 UK sales 0141 416 3414
Find us on FacebookFollow us on TwitterJoin us on LinkedinView ECT YouTube channelEcommerce Templates Google Plus
Connect with us on:
Home | Overview | Features | Buy Now | Live Stores | Support | Affiliates | Testimonials | Downloads | News | Hosting | Demo Store | Contact

Ecommerce Templates > General Help > Digital downloads

Digital downloads Ecommerce Template plug-in

Digital downloads

The digital download plug-in allows you to offer products for sale that are available as an immediate download following purchase. This might be useful when selling e-books, software, music etc where you want to provide the customer with immediate access to your products. It is possible to have both standard products and downloadable ones on the same store.

The way it works is that once somebody has purchased from your store they are sent on to the thanks page in the normal manner. On that page they will see a box with a download link that allows them to get a copy of the downloadable product. They will also receive an email regarding the purchase. This can be configured to allow the number of days following purchase that the item will be available for along with an URL and password for making the late download.

We have set up our User Manual as an example of how the digital download process works. This can be "purchased" from our demo store. Please note that the digital download plug-in is only available for the Ecommerce Templates shopping cart.

Requirements

  • Digital download plug-in - buy now for $39.95
  • Ecommerce Template
  • ASP Upload installed on the server (ASP version only, for secure downloads)

Set up details

ASP Version

Once you have downloaded and extracted the digital download plug-in, upload the file dodownload.asp to your vsadmin folder and digidownload.asp to your vsadmin/inc directory.

Copy the file updatestore.asp to your website and open in a browser and click the button
“Upgrade for Digital Downloads”.

Open the file thanks.asp in HTML / code view and search for the line . . .

<!--#include file="vsadmin/inc/incthanks.asp"-->

. . . and on the line after that add . . .

<!--#include file="vsadmin/inc/digidownload.asp"-->

Note for Worldpay users
After a purchase through Worldpay, the customer is returned to wpconfirm.asp rather than thanks.asp so the instructions are slightly different.

You will need to open vsadmin/wpconfirm.asp and find these lines

' WORLDPAY ONLY : To enable digital downloads, just add a "hash" back into the line below so it looks like this . . .
' <!--#include file="inc/digidownload.asp"-->
' If you apply an updater, you must repeat this step.

so this line

<!--include file="inc/digidownload.asp"-->

is edited to

<!--#include file="inc/digidownload.asp"-->

All users will then need to add some parameters in vsadmin/includes.asp

digidownloads=true

. . . this always needs to be set to true to enable digital downloads. Once set on the admin products page an extra parameter will appear “Download”, which will allow you to enter the location of the download.

digidownloadpattern="\downloads\%pid%.zip"

If required, you can set a pattern for the download filename, and base it on the product id. This parameter is optional. If you use this parameter, to show which products have a download attached enter an “A”, (meaning “Automatic”), on the products admin page for the download setting.

Download

To get the path to your downloads folder you can use the same test.asp file used for setting the database in db_conn_open.asp and changing the resulting string so it points to the correct location on your server.

digidownloadsecret="fe2ls2pl2jJbIONowk234ksdf"

This should always be set and should be set to random alpha-numeric text. It’s just a way of generating a code to make it difficult for hackers to steal your downloads.

digidownloadwarn=TRUE

Setting this parameter to TRUE will mean that if someone does attempt to download with incorrect parameters then you will be sent an email with the subject “Failed Download” and the IP address of the person making the attempt. This could be useful for debugging or spotting fraud attempts.

digidownloadmethod="aspupload"

To setup for secure downloads you need to have a component installed on the server called ASP Upload. If this is installed then set the above to “aspupload”. This will mean that you can place your downloads below the web root where they can only be accessed via the download script. If ASP Upload is not installed then you can still provide digital downloads, but they will not be secure. That is, someone who guesses their location could bypass the download script to obtain them.

digidownloademail="Your email message here if any downloadable products"

This can be used to send your customers an email informing them of how to download their products
in case they missed the original download. Instances of %orderid% and %password% will be replaced
by the order id and password necessary to download their products. You must have v4.8.6 or above
of Ecommerce Plus for this feature to work.
An example of it's use would be . . .

digidownloademail="Your products can be downloaded for the next 3 days by going to the URL%nl%http://www.yoursite.com/latedownload.asp?ordid=%orderid%&pass=%password%%nl%Or alternatively, go to the URL%nl%http://www.yoursite.com/latedownload.asp%nl%. . . and enter the order ID %orderid% and password %password%%nl%%nl%"

Please note how newlines are added to the email by simply adding %nl% meaning you don't have to
worry about different email formats.

digidownloaddays=10

Setting this will make downloads available for the number of days specified. The default is 3 days
and the example above would set it to 10.

How to set up latedownload.asp
You can make your own late download page by opening thanks.asp and saving it as latedownload.asp
In the HTML change:

<!--#include file="vsadmin/inc/incthanks.asp"-->

to

<!--#include file="vsadmin/inc/inclatedownload.asp"-->

... and save the file as latedownload.asp. (Make sure that you don't save the changes to thanks.asp)

If when testing your downloads, clicking on the download link results in a page saying "Connection Error" then it's more than likely you need this parameter in vsadmin/includes.asp

iswin2008r2=TRUE

This is only for ASP users and Windows2008 R2 servers.

PHP Version

Once you have downloaded and extracted the digital download plug-in, upload the file dodownload.php to your vsadmin folder and digidownload.php to your vsadmin/inc directory.

Copy the file updatestore.php to your website and open in a browser and click the button
“Upgrade for Digital Downloads”.

Open the file thanks.php in HTML / code view and search for the line . . .

<?php include "vsadmin/inc/incthanks.php" ?>

. . . and on the line after that add . . .

<?php include "vsadmin/inc/digidownload.php" ?>

You will then need to add some parameters in vsadmin/includes.php

$digidownloads=TRUE;

. . . this always needs to be set to true to enable digital downloads. Once set on the admin products page an extra parameter will appear “Download”, which will allow you to enter the location of the download.

$digidownloadpattern="\downloads\%pid%.zip";

If required, you can set a pattern for the download filename, and base it on the product id. This parameter is optional. If you use this parameter, to show which products have a download attached enter an “A”, (meaning “Automatic”), on the products admin page for the download setting.

Download

$digidownloadsecret="fe2ls2pl2jJbIONowk234ksdf";

This should always be set and should be set to random alpha-numeric text. It’s just a way of generating a code to make it difficult for hackers to steal your downloads.

$digidownloadwarn=TRUE;

Setting this parameter to TRUE will mean that if someone does attempt to download with incorrect parameters then you will be sent an email with the subject “Failed Download” and the IP address of the person making the attempt. This could be useful for debugging or spotting fraud attempts.

$digidownloadmethod="filesystem";

To use the operating systems filesystem set the above parameter. This will allow you to specify for instance files outside your web root for instance . . .
/your/path/to/yourfile.zip

To get the path to your downloads folder make a file called t.php in a text editor with the following code

<html><body><?php
echo getcwd();
?></body></html>

...upload that to your web root and open it in your browser. That will give you the path to the web root from which you should be able to work out the path to your downloads folder you've set up. Paste the path into $digidownloadpattern

Otherwise by default the system will use http for the file location, allowing you to specify for instance
http://www.yoursite.com/yourdirectory/yourfile.zip

$digidownloademail="Your email message here if any downloadable products";

This can be used to send your customers an email informing them of how to download their products
in case they missed the original download. Instances of %orderid% and %password% will be replaced
by the order id and password necessary to download their products. You must have v4.8.6 or above
of Ecommerce Plus for this feature to work.
An example of its use would be . . .

$digidownloademail="Your products can be downloaded for the next 3 days by going to the URL%nl%http://www.yoursite.com/latedownload.php?ordid=%orderid%&pass=%password%%nl%Or alternatively, go to the URL%nl%http://www.yoursite.com/latedownload.php%nl%. . . and enter the order ID %orderid% and password %password%%nl%%nl%";

Please note how newlines are added to the email by simply adding %nl% meaning you don't have to
worry about different email formats.

$digidownloaddays=10;

Setting this will make downloads available for the number of days specified. The default is 3 days
and the example above would set it to 10.

How to set up latedownload.php
You can make your own late download page by opening thanks.php and saving it as latedownload.php
In the HTML change:

<?php include "vsadmin/inc/incthanks.php" ?>

to

<?php include "vsadmin/inc/inclatedownload.php" ?>

... and save the file as latedownload.php. (Make sure that you don't save the changes to thanks.php).

Download files as product options

If you want to offer products which can be shipped or downloaded and you need to offer your clients that choice then you will need to use the ALT ID feature for product options outlined here.

You will need to set the Alt Pro ID to two exclamation marks like this
!!
. . . for any product option which does NOT have a download associated with it.

Make sure it is the resulting product for the alt prod id that has the "a" for "automatic" or download path in the download field, not the main product.

Also, anything you add for the Alt Prod ID can be preceded with an exclamation mark to show that it is only to alter the download filename not the product id. For instance this would alter an occurence of XXX in the product id to ABC
XXX ABC
This will do it for the download filename only
!XXX ABC

You can also use the following construction to quickly add a file extension to a download filename.
!%s.zip
!%s.sit
These will add ".zip" and ".sit" extensions to the download filename respectively.