{"id":2283,"date":"2023-09-19T07:30:09","date_gmt":"2023-09-19T07:30:09","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/get-store-name-in-magento-2-email-template\/"},"modified":"2025-03-07T04:43:47","modified_gmt":"2025-03-07T04:43:47","slug":"get-store-name-in-magento-2-email-template","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/get-store-name-in-magento-2-email-template\/","title":{"rendered":"How to Get Store Name in Magento 2 Email Template"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Email is the most common way to communicate with customers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It helps the business owner stay in touch with the customers, establish trust, and build long-term relationships.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next thing you need to do after setting up a Magento 2 store is to&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/customize-email-templates-in-magento-2\/\">customize emails<\/a>. The&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/install-magento-2\/\">default Magento 2 installation<\/a>&nbsp;has all the necessary emails set up.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also customize the email templates in the Magento 2 backend per your needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Magento 2 allows you to use the\u00a0<a href=\"https:\/\/developer.adobe.com\/commerce\/docs\/\" target=\"_blank\" rel=\"noreferrer noopener\">variables in email templates<\/a>\u00a0and give a personal touch!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Merchants often want to display store information, such as store name, phone number, email, etc., in the communication emails.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One way to do this is directly specify them in the email templates. But, if you have a&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/setup-magento-2-multi-store\/\">multi-store setup<\/a>&nbsp;and want to display store names dynamically, you\u2019ll need to use the variable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But how do you&nbsp;<em><strong>get store name in Magento 2 email template?<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s find it out through this step-by-step tutorial.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Display Store Name in Magento 2 Email Template?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In Magento 2 email templates, you can use the&nbsp;<em>{{var store.getFrontendName()}}<\/em>&nbsp;variable anywhere you want to display the store name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The store name is fetched from the store information you configured.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s how you can change\/set the store name in Magento 2:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go to&nbsp;<strong>Stores &gt; Configuration &gt; General &gt; General<\/strong>. Set the name and click the&nbsp;<strong>Save Config<\/strong>&nbsp;button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2023\/07\/1-steps-to-set-up-store-information-in-Magento-2.png\" alt=\"steps to set up store information in magento 2 to display store name in emails\" class=\"wp-image-33276\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Similar to the store name variable, you can also display other contact information in the email templates. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For Store Email \u2013 {{var store_email}}<\/li>\n\n\n\n<li>For Store Phone \u2013 {{var store_phone}}<\/li>\n\n\n\n<li>For Store Open Hours \u2013 {{var store_hours}}<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Did you learn something new today? Share this post on social media and help spread the knowledge.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Email is the most common way to communicate with customers. It helps the business owner stay in touch with the customers, establish trust, and build&#8230;<\/p>\n","protected":false},"author":13,"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-2283","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2283","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\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=2283"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2283\/revisions"}],"predecessor-version":[{"id":8582,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2283\/revisions\/8582"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=2283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=2283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=2283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}