PHPackages                             silvercommerce/downloadable-products - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. silvercommerce/downloadable-products

ActiveSilverstripe-vendormodule[File &amp; Storage](/categories/file-storage)

silvercommerce/downloadable-products
====================================

Allow adding a file to a product that can be downloaded by users who buy it.

1.0.x-dev(5y ago)0363BSD-3-ClausePHPCI failing

Since Apr 7Pushed 5y ago3 watchersCompare

[ Source](https://github.com/silvercommerce/downloadable-products)[ Packagist](https://packagist.org/packages/silvercommerce/downloadable-products)[ Docs](http://github.com/silvercommerce/downloadable-products)[ RSS](/packages/silvercommerce-downloadable-products/feed)WikiDiscussions 1.0 Synced 2mo ago

READMEChangelogDependencies (5)Versions (1)Used By (0)

SilverCommerce Downloadable Products Module
===========================================

[](#silvercommerce-downloadable-products-module)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2b8f66fbff4a711cd9b75cc7c709a93fd439f5b485f098564c92f930d6fd857e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73696c766572636f6d6d657263652f646f776e6c6f616461626c652d70726f64756374732f6261646765732f7175616c6974792d73636f72652e706e673f623d312e30)](https://scrutinizer-ci.com/g/silvercommerce/downloadable-products/?branch=1.0)

Adds a downloadable product type to a SilverCommerce install, that allows users to attach a file that can only be downloaded when the user has bought it.

Dependancies
------------

[](#dependancies)

- SilverStripe Framework 4.0.x
- SilverCommerce 1.0.x

Installation
------------

[](#installation)

Install using composer:

```
composer require silvercommerce/downloadable-products

```

Then run: dev/build/?flush=1

Usage
-----

[](#usage)

1. Visit /admin on your SilverStripe site.
2. Navigate to the "Catalogue".
3. Add a new "Downloadable Product" and setup.
4. Click "Settings" and attach a file.

Setting a longer Link Life
--------------------------

[](#setting-a-longer-link-life)

By default, all products will be available via their download link for 7 days (if the user did not create an account during the pruchase process).

If you would like to increase this length, you can change it on the product, under "Settings". Alternativley you can change this glocally using config:

```
SilverCommerce\DownloadableProducts\DownloadableProduct:
    defaults:
        LinkLife: 14 # two weeks

```

**NOTE: You will ned to re-save any existing products for this to take effect**

Restrict the downloads folder
-----------------------------

[](#restrict-the-downloads-folder)

By default, this module adds files into a restricted folder. Any file attached to a `DownloadableProduct` will be moved to this folder and made unavailable to view unless the current user can edit the file they use the associated download link.

**NOTE: You need to ensure SilverStripe is managing your assets folder for access restriction to work.**

### Changing the default download location

[](#changing-the-default-download-location)

If you wish to change the default location downloadable products are placed, you can change the `folder_name` config variable, EG:

```
SilverCommerce\DownloadableProducts\DownloadableProduct:
    folder_name: "mydownloadlocation"

```

The `FileDownloadController`
----------------------------

[](#the-filedownloadcontroller)

By default, anyone purchasing a downloadable product can be provided a download link (see below). This will send them to `FileDownloadController`, which will attempt to see if the user is allowed to download the file.

If the link has expired, or the user user is not allowed to download, an error will be displayed.

Add a `DownloadLink` to orders pannel and emails
------------------------------------------------

[](#add-a-downloadlink-to-orders-pannel-and-emails)

When you have access to a product in either the orders panel or an email then you can call `$DownloadLink` to render the download URL into the template.

For example, if an invoice has been produced and marked as paid (and you have setup a relevent notification) you can update your email template to use the following:

```
OrderNotificationEmail_Customer.ss

            {$Title}
            (Download)
            ($StockID)
            $CustomisationHTML

        {$Quantity}
        {$Price.Nice}

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 89.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1861d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7d4998767cb41bf0048a65158559384fbab33751b26c996d6367019c68c4f8b?d=identicon)[DFT](/maintainers/DFT)

---

Top Contributors

[![mlewis-everley](https://avatars.githubusercontent.com/u/687143?v=4)](https://github.com/mlewis-everley "mlewis-everley (42 commits)")[![Makreig](https://avatars.githubusercontent.com/u/6011781?v=4)](https://github.com/Makreig "Makreig (5 commits)")

---

Tags

silverstripeshopproductscommercesilvercommercedownloadable

### Embed Badge

![Health badge](/badges/silvercommerce-downloadable-products/health.svg)

```
[![Health](https://phpackages.com/badges/silvercommerce-downloadable-products/health.svg)](https://phpackages.com/packages/silvercommerce-downloadable-products)
```

###  Alternatives

[bummzack/sortablefile

An extension for SilverStripe that adds sorting to UploadField.

70622.7k55](/packages/bummzack-sortablefile)[silvershop/core

Provides an ecommerce product catalog, shopping cart, and order management system

11340.0k42](/packages/silvershop-core)[unclecheese/dropzone

An HTML5 upload field for the CMS and frontend forms.

46130.7k6](/packages/unclecheese-dropzone)[silverstripe/s3

Adds SilverStripe support for using the S3 adapter for Flysystem

20297.0k1](/packages/silverstripe-s3)[axllent/silverstripe-scaled-uploads

Automatically scale down and rotate uploaded images for Silverstripe

2580.3k8](/packages/axllent-silverstripe-scaled-uploads)[sunnysideup/ecommerce

Silverstripe E-commerce Application

257.2k79](/packages/sunnysideup-ecommerce)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
