A digital product skips shipping and can carry files. When someone buys it, KahunaCart creates a download grant for each file: a private link with its own download counter and optional expiry, shown on the customer's order page.
Set up a digital product
- Open KahunaCart → Products and open the product, or click New product.
- Set Type to Digital.
- Upload the files in the Downloadable files panel.
- Set a download limit or an expiry per file if you want one. Files with none use the store defaults, which are unlimited downloads and no expiry.
- Click Save.
A single upload is capped at 512 MB by default (downloads.max_upload_mb). PHP's own upload_max_filesize and post_max_size still apply, and are usually lower.
When the customer gets the link
Download links are created by a background job, so Grav's scheduler must be running. By default they are created once the payment is captured. For bank transfers and other offline methods, that means when you click Mark paid.
To hand over downloads as soon as an order is placed, set Grant Downloads On to Order placed on the Downloads tab of KahunaCart → Settings.
Large files
The default delivery method sends files through PHP, which works everywhere but holds a PHP worker for the whole transfer. For large files or busy stores, let the web server send them: xaccel on nginx, xsendfile on Apache. See Digital products → Delivery methods.
More detail
- Digital products and downloads in the docs