Quantcast
Channel: WooCommerce Docs » Tutorials
Viewing all articles
Browse latest Browse all 7

Digital/Downloadable product handling

$
0
0
This tutorial build upon Managing Products but explains downloadable products specifically. Enjoy!

Handling downloadable products in WooCommerce is a piece of cake – before we add products though, lets look at the settings specifically used for downloadable products.

Settings

WooCommerce > Settings contains several downloadable product options. The most important option is the file download method:

You have 3 choices:

  • Redirect only – When users download a file, their link simple redirects to the file.
  • Force download – File downloads are forced using PHP.
  • X-Sendfile – Downloads are served by Apache. Requires the X-Sendfile module (not all servers have this).

To ensure files are protected from direct linking, Force Download can be used. Files will be served by PHP. However, if your files are large, or server is underpowered, you may experience timeouts during download – in this case you would need to either look at your server or use the redirect method.

If your server supports it, use X-Sendfile; its the most reliable method. Apache serves the download giving you the best performance. Files are also protected by a .htaccess file making this method secure.

The next option is “Must be logged in to download files“. This will only allow logged in users to download – non logged in users will need to login. Its important to disable guest checkout if this option is enabled, as guests cannot download.

Finally, “

Setting up downloadable products

Simple Products

Create a simple product the regular way, but check the ‘downloadable’ box:

After checking this box some extra options will appear:

Product options in 1.7

WooCommerce 1.7 supports multiple files per product!

Upload a file and click ‘insert’ to set up each downloadable file URL. In 1.7 you can enter 1 per line, but in versions prior to that you can only set up 1 file per product. If you need to add multiple files in older version you may want to ‘zip’ the files into 1 package.

For the download limit you can optionally set a limit of downloads; once the user hits this limit they will no longer be able to download the file.

Download expiry works in the same way; if you define a number of days, after that many days the download links will expire.

Variations

Variable products can also have downloadable variations. When adding a variation check the ‘downloadable’ box to see the options:

The options work the same as with regular products; set the file path, optionally choose a limit and expiry and your done.

Combining downloadable and virtual products

If you simply check the downloadable boxes, the products can have stock and will be treated as physical products – this lets you do things such as sell downloads and real products together.

If you want a downloadable product which is not physical, also enable the ‘virtual’ option.

The order process

The order process for downloadable products is as follows:

  1. User adds product to their cart
  2. Users checks out and pays
  3. After payment several things can happen depending on your setup:
  • If the items in the order are all downloadable + virtual the order will complete
  • Otherwise, the order will be processing until you change it
  • Once complete, or if the option “Grant access to downloadable products after payment” is enabled, the user will:
    • Be granted download permissions
    • See the download links on the order received page
    • See the download links in their email notification
    • See the download links on their ‘My Account’ page if logged in
    Users can then download their files.

    Managing orders with downloadable line items

    If you edit/view an order with downloadable products within it you will notice the downloadable products meta box contains the users permissions:

    By editing this panel you can modify a users permissions, or revoke access to files. You can also grant access to new downloads.


    Viewing all articles
    Browse latest Browse all 7

    Trending Articles