Skip to main content
If a shop sells download products, the buyer receives a download ID after the order. With it, they call up a separate page on which their files are available for download. This page is the download template. The template contains four sections, of which the shop only ever displays one. Which one it is depends on the request: with a valid download ID, without an ID, after logging in to the shop, or after an error. Guide: Offering download products
The tags of this template have no prefix. Msg, OrderNumber or File are named exactly like that and only apply here. They have nothing to do with tags of the same name in other templates.
Each section is bracketed as a range. Anything outside all four ranges, for example the header and footer, always appears.

The structure of the template

DownloadError: the error case

This section appears if a requested download was not delivered, for example because the number of permitted downloads has been used up or the period has expired.
The text in ErrMsg comes from the error messages of the download module. The messages about the exceeded number and the expired period may contain the placeholders ~maxdownloads~ and ~expdt~. The shop replaces them with the permitted number or the expiry date respectively.

DownlIdInput: entering the download ID

This section appears if the page was called up without a download ID or the specified ID is incorrect. The buyer then gets an input field.
In the error case, Msg contains the notice about the invalid ID and is otherwise empty. Your own introductory text therefore belongs directly in the template and not in this tag.
Between two download attempts, the shop deliberately waits one second so that download IDs cannot be guessed by trial and error. Therefore, do not build any automatic retries into the form.

OrderList: the buyer’s orders

This section appears if a buyer logged in to the shop calls up their orders with download products.
Orders is a pure loop tag and is opened with {@Orders}. A simple bracketing {Orders} has no effect. NoOrders is there to answer the question of whether there are any orders at all. The previous documentation lists Orders as a range tag.
OrderDateTime is the point in time at which the download products were added to the download management. This is usually the time of the order, but it does not have to match it to the second.
DownloadAllowed and DownloadDone are not mutually exclusive. An order with several files can be both at the same time.

ArticleList: the files of an order

This section shows the download products of an order.
Articles is also a pure loop tag and is opened with {@Articles}. The previous documentation lists it as a range tag.

What the counters actually output

Downloads and ValidDateTime do not always output a number or a date. If the number is unlimited, the text for “unlimited” appears there, and the same applies to the period. If the download was stopped, ValidDateTime contains the text for “stopped”. Therefore, do not calculate with these values in the template.
FileSize outputs a hyphen if the file no longer exists on the server. This is the quickest way to detect a missing download product.
File only contains the file name without a directory, and DownloadUrl is only filled if the download is actually still allowed. Therefore, place the link within {DownloadAllowed}.

Highlighting exhausted and expired downloads

Two further tags return a ready-made CSS class for the warning case.
The tags output the complete attribute, i.e. class='warning', and nothing else. They therefore belong directly in the opening element without their own attribute name. Neither is described in the previous documentation, but both exist in the shop.

Overview of the tags

All tags are permitted exclusively in the download template, each within the specified section.
  • Guide: Offering download products
  • Guide: Upload module
  • Guide: Customer account