Skip to main content
For printed products, promotional items or custom-made articles, it is not the shop that supplies the data but the buyer. After ordering, they upload their files, one or more per order item, and report at the end that they are done. This is handled by the upload module, a separate program alongside the shop. Its interface is created from exactly one template, usually 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
Not a single shop template tag works in this template, neither PR-, nor BASKET-, nor WS-. Conversely, the placeholders on this page have no meaning in the shop. The notation is the same: ~Name~ for a value, {Name} and {/Name} for a range, {@Name} and {/@Name} for a loop.

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.
Everything outside these three ranges appears on every view. This is the right place for the header and footer, for {Msg} and for ~WSUploadScripts~.

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.
About half of the placeholders are not available for the inquiry upload. This affects all placeholders that require an order or an item. The overview table at the end of the page lists this for each placeholder. If you want to serve both operating modes with one template, restrict yourself to the placeholders that apply in both.

The page frame

These placeholders can be placed anywhere in the template and describe the environment.
~WSUploadScripts~ is not optional. Without this placeholder, the template lacks the scripts for the progress display, cancellation and the selection of the intended use. Set it once, as early as possible in the body.
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.
{PosLocked} also applies when not this item but the entire order has been completed. This is intentional, because the result is the same for the buyer. To distinguish the two, additionally use {UploadLocked}.

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.
Both fields belong together for deleting. The checkbox from FileMarkBoxName marks the file, and the hidden field from FileNameName passes the corresponding file name. If you omit one of them, the selection does not reach the program.
{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

The name of the file field is fixed and is uplfile, that of the intended use field is uplfileinfo. Neither exists as a placeholder; write them directly into the template.
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 reference template does not bracket the upload form with {!Web2Print} but with a commented-out {!Web2PrintX}, which does not exist. For a web-to-print order, both the notice and the form therefore appear there. The example above sets the bracketing correctly.

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.
Both ranges only appear if the respective check is classified as an error in the configuration. If it is only switched on for monitoring, it is triggered, but the range remains empty. This is not stated in the previous documentation and explains the case where a file is rejected without the template displaying anything.
The supplied reference template contains neither {MimeTypeMismatch} nor {VirusDetected}. Anyone who adopts it unchanged has no display for these two cases. Add both ranges.

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 nesting in the example is not decoration but necessary. The completion button only belongs on the page if files are available, the upload is not yet locked and there is something for every item. If one of the three bracketings is missing, the page offers a button that either does nothing or locks too early.

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

Both ranges only apply if the upload program was called with the parameter unlockallow=Y and the respective completion actually exists. Without this parameter, they remain silent even if everything else fits.
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.
  • Guide: Integrating the upload module
  • Reference: wsupload.config
  • Reference: SENDUPLOADLINK- (Sending the upload link by email)