ws_upload.htm. This template contains the placeholders on this page. They follow the same structure as shop template tags, but they belong to the upload program and not to the shop.
- Guide: Integrating the upload module
- Reference: wsupload.config
Three views in one template
The upload program shows three views one after the other, and all three are contained in the same file. The program decides which one appears; the template only supplies the building blocks.If an order has only a single item, the program skips the list and shows
{Item} immediately. The {ItemList} range then does not appear at all. Build both anyway, because the same file serves both cases.Two operating modes
The upload module works not only after an order but also for inquiries via the inquiry form. This inquiry upload has no order items and therefore not all placeholders.The page frame
These placeholders can be placed anywhere in the template and describe the environment.According to the previous documentation,
protocol and hostname are only permitted within the log loop. The reference template uses both in the base element in the page header, and that is exactly where they belong. The restriction in the source is too narrow.Messages
Querying the upload ID or order number
If someone calls the upload program without an identifier,{UplIdInput} appears. There the buyer enters either the upload ID from their order confirmation or their order number.
The upload program assigns an upload ID per order and additionally an item ID per order item. The buyer receives the upload ID; they do not need to know the item ID.
The names of the two input fields are fixed and are
UploadId and Ordernumber. There are no _input placeholders here as in the shop; write the names directly into the template.Use
{OrdNumMode} to label the display appropriately. If the process works via the order number, it is not very helpful to show the buyer an upload ID that they cannot find anywhere.The list of order items
If the order has several items,{ItemList} shows the overview. {@PrdData} loops over the items within it.
{HasFile} answers the question for the one item in the iteration, {HasFiles} further below for the entire order or the displayed item. The two names differ only in the final s, but the meaning is different.Back to the list
Both only apply if the order has more than one item. With a single item, there would be nowhere for the link to lead.
ItemListLink is therefore both a value and a bracketing, which is also how the previous documentation specifies this tag.An item with its files
{Item} is the detail view. It contains everything relating to a single order item.
The existing files
{@Files} loops over the files that have already been uploaded for this item.
{NoFiles} is intended to be placed after {HasFiles}. The two ranges are mutually exclusive, so {NoFiles} is the more readable form of the negative bracketing of {HasFiles}.The intended use per file
For each file, you can store what it is intended for, for example front side, back side or proof. The selection options are defined in the<+FileInfo> subsections of the <Upload> section in wsupload.config.
The difference between the two option lists is the preselection.
fileinfoopts belongs to a file that has already been uploaded and has its intended use preselected, uplfileinfoopts belongs to the field for the new file and has nothing preselected.Changing the intended use happens in the background without reloading the page. Hence the loading graphic, which is addressed via
FileInfoProcId. The entire group is optional. If you do not need an intended use, omit all four placeholders.Uploading a new file
uploadUrl belongs to the newer version of the upload module, which uploads via a JavaScript plugin, and replaces uplurl there. Which version your shop uses depends on the embedded script and the structure of the form. Do not mix the two.The limits
These three values are stored by WEBSALE technical support and agreed with the shop operator. Output them in the template instead of writing numbers into it; then the text is still correct after a change.
NewUplLink is intended for the error case, for example for the notice when the file size has been exceeded. It leads back to the upload page of the same item.Rejected files
The upload program checks each file for its MIME type and for malware. If a check is triggered, the corresponding range appears.Completing and reopening
At the end, the buyer confirms that they have supplied all files. After that, the program no longer accepts anything. This can be done either for the entire order or per item.{AllPosLock} and {SinglePosLock} are not decided by the template but by the operating mode stored in the module’s configuration. There are three options: completion only for the entire order, only per item, or both at once. The default is completion for the entire order. Include both ranges, and the template works in every operating mode.The form addresses
Within the item loop,
poslockurl refers to the item in the iteration and outside it to the displayed item. This is why the same placeholder works in both places.lockurl and ordlockurl do the same thing but are intended for different views. Use one in {ItemList} and the other in {Item}, as specified in the column above.Reversing the completion
Reversing is intended for the case where the buyer subsequently finds an error in their data and production has not yet started.
The log
The program keeps a log for each process, which can be output in the template.Type is already readable text such as “Datei hochgeladen” (file uploaded) or “Datei gelöscht” (file deleted), not a technical code.FileName appears both in the file loop and in the log loop and refers in each case to the file of the current iteration. It is the only placeholder shared by two loops.The placeholders at a glance
The “Located in” column names the range or loop within which the placeholder must be placed. “anywhere” means at any position in the template. The “Inquiry upload” column states whether the placeholder is also available for uploads from the inquiry form.
Further placeholders in the reference template
The supplied template uses three placeholders that are not described in the previous documentation.You only need these three if you rebuild the progress display and cancellation in the template. The reference template shows how they work together. For a simple upload form, the placeholders from the overview above are sufficient.
Related topics
- Guide: Integrating the upload module
- Reference: wsupload.config
- Reference: SENDUPLOADLINK- (Sending the upload link by email)
