{"id":381,"date":"2019-04-17T11:19:15","date_gmt":"2019-04-17T11:19:15","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2019\/04\/17\/list-of-default-variables-used-in-magento-2-email-templates\/"},"modified":"2025-01-02T09:44:52","modified_gmt":"2025-01-02T09:44:52","slug":"list-of-default-variables-used-in-magento-2-email-templates","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/list-of-default-variables-used-in-magento-2-email-templates\/","title":{"rendered":"A Complete List of Default Variables Used in Magento 2 Email Templates"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You may want to bookmark this post for future reference as it has the complete <i><strong>list of default variables used in Magento 2 Email templates<\/strong><\/i>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Magento 2 has this excellent functionality to send various Emails to customers at each stage of the shopping cycle. Email customization and Email template is an important topic for any online shop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a developer, you may not remember every default variable used in Email templates in Magento 2. Hence the below list might prove helpful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>List of Default Variables Used in Magento 2 Email Templates:<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>Default Variable Description<\/strong><\/th><th><strong>Magento 2 Default Variable<\/strong><\/th><\/tr><\/thead><tbody><tr><td>Email Footer Template<\/td><td>{{template config_path=&#8221;design\/email\/footer_template&#8221;}}<\/td><\/tr><tr><td>Email Header Template<\/td><td>{{template config_path=&#8221;design\/email\/header_template&#8221;}}<\/td><\/tr><tr><td>Email Logo Image Alt<\/td><td>{{var logo_alt}}<\/td><\/tr><tr><td>Email Logo Image URL<\/td><td>{{var logo_url}}<\/td><\/tr><tr><td>Email Logo Image Height<\/td><td>{{var logo_height}}<\/td><\/tr><tr><td>Email Logo Image Width<\/td><td>{{var logo_width}}<\/td><\/tr><tr><td>Template CSS<\/td><td>{{var template_styles|raw}}<\/td><\/tr><tr><td>Base Unsecure URL<\/td><td>{{config path=&#8221;web\/unsecure\/base_url&#8221;}}<\/td><\/tr><tr><td>Base Secure URL<\/td><td>{{config path=&#8221;web\/secure\/base_url&#8221;}}<\/td><\/tr><tr><td>General Contact Name<\/td><td>{{config path=&#8221;trans_email\/ident_general\/name&#8221;}}<\/td><\/tr><tr><td>Sales Representative Contact Name<\/td><td>{{config path=&#8221;trans_email\/ident_sales\/name&#8221;}}<\/td><\/tr><tr><td>Sales Representative Contact Email<\/td><td>{{config path=&#8221;trans_email\/ident_sales\/email&#8221;}}<\/td><\/tr><tr><td>Custom1 Contact Name<\/td><td>{{config path=&#8221;trans_email\/ident_custom1\/name&#8221;}}<\/td><\/tr><tr><td>Custom1 Contact Email<\/td><td>{{config path=&#8221;trans_email\/ident_custom1\/email&#8221;}}<\/td><\/tr><tr><td>Custom2 Contact Name<\/td><td>{{config path=&#8221;trans_email\/ident_custom2\/name&#8221;}}<\/td><\/tr><tr><td>Custom2 Contact Email<\/td><td>{{config path=&#8221;trans_email\/ident_custom2\/email&#8221;}}<\/td><\/tr><tr><td>Store Name<\/td><td>{{config path=&#8221;general\/store_information\/name&#8221;}}<\/td><\/tr><tr><td>Store Phone Number<\/td><td>{{config path=&#8221;general\/store_information\/phone&#8221;}}<\/td><\/tr><tr><td>Store Hours<\/td><td>{{config path=&#8221;general\/store_information\/hours&#8221;}}<\/td><\/tr><tr><td>Country<\/td><td>{{config path=&#8221;general\/store_information\/country_id&#8221;}}<\/td><\/tr><tr><td>Region\/State<\/td><td>{{config path=&#8221;general\/store_information\/region_id&#8221;}}<\/td><\/tr><tr><td>Zip\/Postal Code<\/td><td>{{config path=&#8221;general\/store_information\/postcode&#8221;}}<\/td><\/tr><tr><td>City<\/td><td>{{config path=&#8221;general\/store_information\/city&#8221;}}<\/td><\/tr><tr><td>Street Address 1<\/td><td>{{config path=&#8221;general\/store_information\/street_line1&#8243;}}<\/td><\/tr><tr><td>Street Address 2<\/td><td>{{config path=&#8221;general\/store_information\/street_line2&#8243;}}<\/td><\/tr><tr><td>Store Contact Address<\/td><td>{{config path=&#8221;general\/store_information\/address&#8221;}}<\/td><\/tr><tr><td>Customer Account URL<\/td><td>{{var this.getUrl($store, &#8216;customer\/account\/&#8217;)}}<\/td><\/tr><tr><td>Customer Email<\/td><td>{{var customer.email}}<\/td><\/tr><tr><td>Customer Name<\/td><td>{{var customer.name}}<\/td><\/tr><tr><td>Billing Address<\/td><td>{{var formattedBillingAddress|raw}}<\/td><\/tr><tr><td>Email Order Note<\/td><td>{{var order.getEmailCustomerNote()}}<\/td><\/tr><tr><td>Order ID<\/td><td>{{var order.increment_id}}<\/td><\/tr><tr><td>Order Items Grid<\/td><td>{{layout handle=&#8221;sales_email_order_items&#8221; order=$order area=&#8221;frontend&#8221;}}<\/td><\/tr><tr><td>Payment Details<\/td><td>{{var payment_html|raw}}<\/td><\/tr><tr><td>Shipping Address<\/td><td>{{var formattedShippingAddress|raw}}<\/td><\/tr><tr><td>Shipping Description<\/td><td>{{var order.getShippingDescription()}}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Also Read, <a href=\"https:\/\/meetanshi.com\/blog\/get-store-name-in-magento-2-email-template\/\">How to Get Store Name in Magento 2 Email Template<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hopefully, the post is useful for Magento 2 developers  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If that&#8217;s the case, please rate the post with 5 stars!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may want to bookmark this post for future reference as it has the complete list of default variables used in Magento 2 Email templates&#8230;.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-381","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=381"}],"version-history":[{"count":1,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/381\/revisions"}],"predecessor-version":[{"id":4139,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/381\/revisions\/4139"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}