Building Custom Templates

Order Desk uses a template language called Twig to build your email and receipt templates. Read about Twig here.

The basic syntax uses two curly braces to echo a variable {{ first_name }} and a curly brace and percent to write PHP. You could do something like this:

{% if first_name is defined %} {{ first_name }} {% endif %}

Order Desk passes in order variables to each template. The best way to see what’s available is to review the existing code samples. You can also view the Field Names Reference guide for assistance.

Here are some sample receipt templates.

Still need help? Contact Us Contact Us