Mail To Order


Variables

Variables for dynamic template:

  • link
  • order_first_name
  • order_last_name
  • order_amount
  • order_description
  • order_date
  • order_currency
  • order_company_name
  • order_website_url
  • products (loop)
    • product_name
    • product_price
    • product_currency

Example

Create email template with such html code:

<div class="entry">
    <p><a href="{{link}}">Link to payment page</a></p>
    <p>Hello {{order_first_name}} {{ order_last_name }} you recieve the order!</p>
    <p>Details:</p>
    <p>Description: {{order_description}}</p>
    <p>Amount:      {{order_currency}}{{order_amount}}</p>

    {{#if order_company_name}}
        <p>Company name: {{order_company_name}}</p>
        <p>Url: {{order_website_url}}</p>
    {{/if}}
</div>


For looping products:

<table>
    {{#if products}}
        {{#each products}}
            <tr>
                <td>{{product_name}} - {{product_currency}}{{product_price}}</td>
            </tr>
        {{/each}}
    {{/if}}
</table>