Skillnad mellan versioner av "Templating:Printed orders"
Från Vendre Help
(Skapade sidan med 'Having relaxed intercourse is a well known fact of existence . A lot of people do it , and the majority of love it . It really is fine to be in an important relationship , howeve...') |
Philip (Diskussion | bidrag) (Skapade sidan med 'This page documents the Twig template variables and extensions available in printed orders. ==Twig extensions== ===admin_langstr, order_langstr=== <tt>admin_langstr</tt> and...') |
||
| Rad 1: | Rad 1: | ||
| − | + | This page documents the Twig template variables and extensions available in printed orders. | |
| − | + | ==Twig extensions== | |
| + | ===admin_langstr, order_langstr=== | ||
| + | <tt>admin_langstr</tt> and <tt>order_langstr</tt> are functions that take a language string and return its value for either the administration's language or the order's language. Language strings are loaded from the global namespace. | ||
| − | + | <tt>order_langstr</tt> is not available when printing pickinglists. | |
| + | |||
| + | Example: | ||
| + | <pre> | ||
| + | {{ admin_langstr('TEXT_HEADER_DEFAULT') }} | ||
| + | </pre> | ||
| + | |||
| + | ===admin_currency_format, order_currency_format=== | ||
| + | <tt>admin_currency_format</tt> and <tt>order_currency_format</tt> are filters that take a currency value and format it according to the administration's default currency or the order's currency. | ||
| + | |||
| + | <tt>order_currency_format</tt> is not available when printing pickinglists. | ||
| + | |||
| + | Example: | ||
| + | <pre> | ||
| + | {{ 12.345 | admin_currency_format }} | ||
| + | </pre> | ||
Versionen från 31 oktober 2018 kl. 11.10
This page documents the Twig template variables and extensions available in printed orders.
Twig extensions
admin_langstr, order_langstr
admin_langstr and order_langstr are functions that take a language string and return its value for either the administration's language or the order's language. Language strings are loaded from the global namespace.
order_langstr is not available when printing pickinglists.
Example:
{{ admin_langstr('TEXT_HEADER_DEFAULT') }}
admin_currency_format, order_currency_format
admin_currency_format and order_currency_format are filters that take a currency value and format it according to the administration's default currency or the order's currency.
order_currency_format is not available when printing pickinglists.
Example:
{{ 12.345 | admin_currency_format }}