Templating:Printed orders
Från Vendre Help
Version från den 31 oktober 2018 kl. 11.10 av 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...')
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 }}