Skip to main content

Email Template Variables

Placeholders let you personalise every reminder automatically — the module replaces each {variable} with live data from the order, the customer, or your store before sending.

note

Available since v1.0.0

Overview

When you write a reminder message, you can embed variables anywhere in the subject line or the message body by wrapping the variable name in curly braces: {reference}, {name}, {totalamount}, and so on.

At send time, the module looks up each value from the current order and substitutes it. There is nothing to configure — the substitution happens automatically as long as the placeholder is spelled correctly, including the curly braces and the exact casing shown in this guide.

A collapsible variable reference is built into the Back Office message editor so you do not need to memorise names. Click Available Variables above the subject or message field to expand the list, then click any variable name to copy it to your clipboard.

Variables that output HTML — specifically {shop_logo}, {order_products}, and {urgency_banner} — must only be placed in the message body, not in the subject line. A subject line cannot render HTML, so those three variables are intentionally hidden from the subject variable picker.

Configuration

There is nothing to enable — variables are always available in every reminder message. To insert one:

  1. Go to Modules > Module Manager > Order Payment Reminders Pro > Configure.
  2. Click Edit on any message in the list.
  3. Place your cursor in the Subject or Message field where you want the value to appear.
  4. Click Available Variables above the field to expand the reference panel.
  5. Click the variable name — it is copied to your clipboard.
  6. Paste it at the cursor position, then click Save.

You can also type a variable directly. Make sure you include both curly braces and match the exact name — {reference} works; { reference } or {Reference} does not.

Custom variables (bank details, support phone, etc.) must be defined first in the Custom Variables tab before they become available as placeholders. See Custom Variables.

How It Works

When the module sends a reminder email, it builds a data map from the current order: the customer's name, the order reference, the total, the date it was placed, and so on. Every placeholder in your subject and body is then replaced with the corresponding value from that map.

Custom variables you define in the Custom Variables tab are merged into this map under the name you gave them. If a custom variable name matches a placeholder in the message, its value replaces it. If no match is found, the placeholder is left unchanged — your customer sees the literal text {variable_name}.

Shop information

These variables output information about your store and are available in both the subject and the message body.

VariableOutputExampleSubject?
{shop_name}Your store's name as set in Shop Parameters > ContactMy Online ShopYes
{shop_url}The full URL of your store including trailing slashhttps://myshop.com/Yes
{shop_logo}An <img> tag pointing to your store logo(HTML image tag)No

Do not place {shop_logo} in a subject line — it will appear as a raw HTML tag. Use it in the message body only.

Customer information

These variables use the name and details of the customer who placed the order.

VariableOutputExampleSubject?
{name}Customer's first nameJohnYes
{surname}Customer's last nameSmithYes
{completename}Customer's full name (first + last)John SmithYes

Use {name} for an informal tone ("Hi {name},") and {completename} for formal communications ("Dear {completename},").

Order information

These variables reflect the specific order the reminder is being sent about.

VariableOutputExampleSubject?
{reference}The order reference numberGDQFM-LMQDBYes
{totalamount}Total order amount including tax, formatted in the order's currency€ 129.90Yes
{order_products}A styled HTML table listing each product with its image, quantity, and price(HTML table)No
{order_products_text}A plain-text list of products, one per line- Blue T-Shirt x2 — €29.00No

{order_products} renders a full product table with thumbnail images, designed for use inside an HTML email body. If the order has no products, it outputs an empty string rather than a broken table.

{order_products_text} outputs one product per line in the format - Product name xQty — Price, followed by a total line. Use this in plain-text sections of your email rather than the HTML body.

Time and cancellation

These variables reflect the order's age and the configured auto-cancel window. If no cancel deadline is set in Global Configuration, {daysleft} and {hoursleft} output 0.

VariableOutputExampleSubject?
{cancel_days}Total number of days configured for auto-cancellation7Yes
{daysleft}Whole days remaining until the auto-cancel deadline3Yes
{hoursleft}Hours remaining until the auto-cancel deadline68Yes

{hoursleft} is the raw hours value — for example, 3 days left might be 68 hours. Use {hoursleft} in final-warning messages where hours create more urgency than days.

Date formats

All date variables output the date the order was placed, not today's date.

VariableFormatExampleSubject?
{date}d-m-Y09-05-2026Yes
{date_us}Y-m-d2026-05-09Yes
{date_english}Ordinal English9th, May 2026Yes
{date_short}Short localized (no year)Sat, 9 MayYes
{date_full}Full localized (no year)Saturday, 9 MayYes
{date_short_year}Short localized with yearSat, 9 May 2026Yes
{date_full_year}Full localized with yearSaturday, 9 May 2026Yes

{date_short} and {date_full} (and their _year counterparts) use your store's locale for month and day names. The output language matches the language the customer used when placing the order, not the Back Office language. A French store will see "samedi, 9 mai" while an English store sees "Saturday, 9 May".

{date_short_year} and {date_full_year} work identically to {date_short} and {date_full} but include the year. These four variables are not shown in the in-app variable picker but work correctly in any message.

Urgency banner

VariableOutputSubject?
{urgency_banner}A color-coded HTML banner block summarizing days left until cancellationNo

The urgency banner is a self-contained HTML block with inline styles — compatible with all major email clients. Its color changes automatically based on {daysleft}:

  • Green (more than 5 days): "Your order will be held for N more days."
  • Orange (2–5 days): "Your order will be held for N more days."
  • Red (fewer than 2 days): "Your order is about to be cancelled."

The banner only renders when auto-cancel is configured (Cancel Order after N days > 0). If there is no cancel deadline, {urgency_banner} outputs an empty string and leaves no visible gap in your email.

Place {urgency_banner} near the top of your message body for maximum visibility, especially in final-warning messages.

Custom variables

Any entry you define in the Custom Variables tab becomes available as a placeholder using the name you gave it. Three conventional names used in the pre-loaded template messages are:

VariableOutputExample
{account_info}Bank account owner nameSmart Modules SL
{account_number}Bank account number or IBANES91 2100 0418 4502 0005 1332
{bank_address}Bank address or branch detailsCaixaBank, Barcelona

These placeholders only work when you have created matching entries in the Custom Variables tab with those exact names. If a matching custom variable does not exist, the placeholder is replaced with an empty string.

You can define any custom variable name you choose — for example, a variable named support_phone becomes {support_phone} in your messages. See Custom Variables for step-by-step instructions.

Internal template variables

The following variables are used by the email HTML wrapper template (mails/template/template.html), not in the message editor itself. They are documented here for reference when editing the email template design.

VariableWhere used
{wr_title}Replaced with the message subject in the HTML template header
{wr_message}Replaced with the full message body in the HTML template
{wr_subject}Identical to {wr_title} — also available in the HTML template
{wr_cancel_order}Internal flag — outputs 1 or 0; do not use in message text

Do not use {wr_cancel_order} in a subject or body — it is an internal value that will display as 0 or 1 to your customers.

Usage Examples

Example: Informal first reminder with bank details

Subject: Payment reminder for your order {reference}

Body:

Hi {name},

Just a quick note — your order {reference} placed on {date} is still waiting for payment.

Amount due: {totalamount}

Please transfer to:
Account holder: {account_info}
IBAN: {account_number}

Thank you,
{shop_name}

Example: Formal follow-up with product list

Subject: Order {reference} — payment pending

Body:

Dear {completename},

We are following up on your order {reference}.
Here is a reminder of what you ordered:

{order_products}

Total due: {totalamount}

Please complete your payment at your earliest convenience.

Kind regards,
{shop_name}

Example: Final warning with urgency banner and hours countdown

Subject: FINAL REMINDER: Order {reference} cancels in {daysleft} days

Body:

Dear {name},

{urgency_banner}

Your order {reference} will be automatically cancelled in {daysleft} days ({hoursleft} hours) if we do not receive payment.

Amount due: {totalamount}

{shop_name}

Important Notes

  • All variables are case-sensitive. {Name} and {NAME} will not be replaced — use the exact lowercase names shown in this guide.
  • Variables that output HTML ({shop_logo}, {order_products}, {urgency_banner}) must only be used in the message body, never in the subject line.
  • {daysleft} and {hoursleft} output 0 when no auto-cancel deadline is configured. Avoid using them in messages where cancellation is not relevant — they will read "0 days left", which may confuse customers.
  • {order_products} can output an empty string if the order's product data is unavailable due to a cron context error. This is handled gracefully — no broken HTML is left behind.
  • Custom variable names are only resolved when a matching entry exists in the Custom Variables tab. A missing custom variable silently outputs an empty string.
  • Multi-shop: variables are resolved in the context of the shop the order belongs to. Custom variables are per-shop, so a placeholder defined on Shop A will not be available on Shop B.
  • {date_short_year} and {date_full_year} are not shown in the in-app variable picker but work correctly in any message body or subject.

Troubleshooting

ProblemSolution
A variable appears as literal text (e.g. {reference} is not replaced)Check spelling and casing — the variable name must exactly match the names in this guide, including both { and } with no spaces inside.
{daysleft} or {hoursleft} shows 0 in every emailAuto-cancel is not configured. Go to Global Configuration and set a value for Cancel Order after N days.
{order_products} shows nothingThis can happen when the order has no products, or when a price formatting error occurs in cron context. Check Advanced Parameters > Logs for entries from WireTransferReminder.
{account_info} or {account_number} shows nothingThese are custom variables. Go to the Custom Variables tab and create entries with exactly those names. See Custom Variables.
{urgency_banner} shows nothingThe banner only renders when a cancel deadline is set. Enable Cancel Order after N days in Global Configuration.
{shop_logo} appears as raw HTML in an emailThe logo <img> tag renders in HTML email bodies only. Do not place it in the subject line. Some email clients also block remote images by default — customers may need to click "display images".
A custom variable I defined is not replacedVerify the variable name in the Custom Variables tab matches the placeholder exactly, including casing. Also confirm it is saved to the correct shop if you run a multi-shop setup.

Frequently Asked Questions

Can I use variables in the email subject line?

Most variables work in the subject, including {reference}, {name}, {completename}, {totalamount}, {daysleft}, {hoursleft}, and all date formats. The exceptions are HTML-output variables — {shop_logo}, {order_products}, and {urgency_banner} — which are body-only. The in-app variable picker shows only subject-safe variables when you expand it above the subject field.

What happens if I use an unknown variable name like {myfield}?

If myfield does not match any built-in variable and is not defined as a Custom Variable, the placeholder is left unchanged — your customers will see the literal text {myfield}. Always test with a test email before activating a message.

How do I add my bank IBAN and account holder name to emails?

Create two Custom Variables in the Custom Variables tab — one named account_info with your account holder name, and one named account_number with your IBAN. Then use {account_info} and {account_number} in your message body. See Custom Variables for step-by-step instructions.

Does {totalamount} include taxes?

Yes. {totalamount} outputs the tax-inclusive total from the order, formatted in the order's currency.

Can I show both days and hours remaining in the same message?

Yes. Use {daysleft} and {hoursleft} together — for example: &quot;Your order will be cancelled in {daysleft} days ({hoursleft} hours).&quot; Both values come from the same calculation and are always consistent with each other.

The date variables show the order date, not today's date — is there a way to show today's date?

All date variables ({date}, {date_us}, etc.) reflect the date the order was placed, not the current date. There is no built-in {today} variable. If you need to communicate urgency, use {daysleft} and {hoursleft} instead.

Are the localized date formats ({date_short}, {date_full}) translated automatically?

Yes. These variables use the language the customer chose when placing the order to format month and day names. A French-language order will show &quot;samedi, 9 mai&quot; while an English-language order shows &quot;Saturday, 9 May&quot; — regardless of your Back Office language.

Can I create my own variables for things like a support phone number or a payment link?

Yes. Any entry you add in the Custom Variables tab becomes available as a placeholder using the variable name you chose. For example, a custom variable named support_phone becomes {support_phone} in your message body. See Custom Variables.

What is the difference between {wr_title} and {wr_subject}?

They output the same value — the subject line of the current reminder message. Both are used in the HTML email wrapper template, not in the message editor itself. You do not need to use either in your message subject or body fields.