Skip to main content
All CollectionsStore SetupEmail Notifications
Using Variables to Configure Email Notifications
Using Variables to Configure Email Notifications

Learn how to use variables when editing the common parts of email notifications.

Olga Tereshina avatar
Written by Olga Tereshina
Updated over 2 years ago

You can use variables when adjusting the header, greeting, text, and signature for your store's email notifications.

You can find a list of variables supported in an email notification and their respective values by clicking on the help icon (tooltip) displayed next to the field you wish to edit.

The variables enable you to provide a placeholder for information that changes from one email message to another or is unknown to you (like the name of the intended recipient of the email notification, an order ID, or a link to the order details). They also enable you to re-use the information you have provided somewhere else in the Admin area without having to write it again in the notification fields.

For example, if you want the greeting of an email notification to mention the user it is sent to, you can specify it as "ear %recipient_name%!". As a result, the email will address the user "Dear First_name Last_name!" based on the user profile data.

Similarly, to place your store's name in the email notification signature, first, specify it in your Store Profile (Store Setup > Store Profile) and then add it to your email notification signature using the %company_name% variable in the text. This way, the company name will appear in the email notification coming to your customer's inbox.

Below is the list of variables supported in the X-Cart store in all email notifications:

  • %company_address%- The company street address as specified in your store profile.

  • %company_city%- The city of your company address as specified in your store profile.

  • %company_country%- The country of your company address as specified in your store profile.

  • %company_fax%- Your company fax number as specified in your store profile.

  • %company_link%- Link to the home page of your X-Cart store - with your Company name used as link text.

  • %company_name%- Your company name as specified in your store profile.

  • %company_phone%- Your company phone number as specified in your store profile.

  • %company_state%- The state of your company address as specified in your store profile.

  • %company_website%- Link to your company website as specified in your store profile.

  • %company_zipcode%- The zip code of your company address as specified in your store profile.

  • %logo% - Your company logo.

  • %recipient_name% - The first and last name of a user as defined in a user profile.

Variables added starting from X-Cart 5.4.0.x

  • %dynamic_message% - Content of a notification based on the "body.twig" template.

Variables added starting from X-Cart 5.4.1.x

  • %first_name%- The first name of a user as defined in a user profile.

Besides the listed above, each notification can have a unique set of variables that can form its content. Refer to a help icon (tooltip) opposite any field on the notification settings page to see all the variables supported.

Related pages:

Did this answer your question?