Templates (UI elements and snippets)

Using templates, the extension in the administration or in other places of the system defines the location where its individual elements (blocks, bookmarks, snippets, etc.) are to be displayed.

Templates

In the Retailys system, it is possible to insert the functionality of an external application in various places in the administration or templates. It is thus possible to add various buttons or snippets for order or product management, form elements to the order form in e-shops and much more. Each template expects a defined URL to be received (eg order ID) and then returns (eg number) the required data.

Each template has its own definition, which according to the data model is on the appropriate endpoint API (System.Layouts). The template is always active if a condition for display using Retailys Language is not defined.

UI elements and snippets supported in Administration

You can find more information about UI elements and snippets in Administration here.

UI elements and snippets supported in Eshop

You can find more information about UI elements and snippets in Eshop here.

Terms and permissions

If a developer wants to place an element or functionality in a specific place in the system only on certain occasions, he can use the rich possibilities of conditions.

There can be many examples of when to use the conditions:

  • the developer may want to display a button to send the invoice to the accounting software only for orders for which an invoice has already been created

  • printing of labels for mail can be displayed only if the order data was previously sent to the mail system and the post office could generate the label

  • we will display the button for sending to the accounting software only if the order is placed on the company No. 123

  • the button to send to the accounting software should only be displayed to an accountant who has the appropriate permissions

Conditions are used to hide or show individual elements (Retailys language).

The conditions only cosmetically hide or show the individual elements of the extension in the Retailys system template. The developer must check the validity of the data obtained via the REST API directly in his code!

Last updated