🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Get Store Name in Magento 2 Email Template

By Jignesh ParmarUpdated on Mar 07, 2025 3 min read

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 long-term relationships.

The next thing you need to do after setting up a Magento 2 store is to customize emails. The default Magento 2 installation has all the necessary emails set up.

You can also customize the email templates in the Magento 2 backend per your needs.

Magento 2 allows you to use the variables in email templates and give a personal touch!

Merchants often want to display store information, such as store name, phone number, email, etc., in the communication emails.

One way to do this is directly specify them in the email templates. But, if you have a multi-store setup and want to display store names dynamically, you’ll need to use the variable.

But how do you get store name in Magento 2 email template?

Let’s find it out through this step-by-step tutorial.

How to Display Store Name in Magento 2 Email Template?

In Magento 2 email templates, you can use the {{var store.getFrontendName()}} variable anywhere you want to display the store name.

The store name is fetched from the store information you configured.

Here’s how you can change/set the store name in Magento 2:

Go to Stores > Configuration > General > General. Set the name and click the Save Config button.

steps to set up store information in magento 2 to display store name in emails

Similar to the store name variable, you can also display other contact information in the email templates. For example:

  • For Store Email – {{var store_email}}
  • For Store Phone – {{var store_phone}}
  • For Store Open Hours – {{var store_hours}}

Did you learn something new today? Share this post on social media and help spread the knowledge.

Thank you!

Jignesh Parmar Full Image
Article byJignesh Parmar

An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.