To edit email templates in Magento 2:
- Log in to the Magento admin panel.
- Go to “Stores” -> “Settings” -> “Configuration.”
- In the left-side menu, navigate to “Sales” -> “Sales Email.”
- Under “Sales Emails,” you will find various email templates for different order statuses.
- Click on the template you want to edit.
- In the “Template Content” section, you can edit the HTML and text of the email.
- To add variables, click on the “Insert Variable” button and select from the list of available variables.
- Click “Save Config” to save your changes.
- Clear the Magento cache.
Your changes to the email template should now be reflected in emails sent to customers.