User Manual - Email Templates & Attachments
- Installing the Magento 2 Email Templates & Attachments extension
- Set up cron
- Uninstalling the Magento 2 Email Templates & Attachments extension
- Extension Compatibility
- Introducing to Magento 2 Email Templates & Attachments
- Using Magento Email Templates & Attachments
- Creating and editing templates
Installing the Magento 2 Email Templates & Attachments extension
Command Line Installation
-
Backup your web directory and store database
-
Download the Email Templates & Attachments installation package
-
Upload contents of the Email Templates & Attachments installation package to your store root directory
-
In SSH console of your server navigate to your store root folder:
|
Run the following command:
php bin/magento module:enable Aheadworks_EmailTemplates |
then:
php bin/magento setup:upgrade |
after:
php bin/magento setup:static-content:deploy -f |
-
Flush store cache; log out from the backend and log in again
| Make sure the installation is done from the FTP administrator account. Otherwise, set 775 permissions to the store root directory after the extension is deployed. |
Composer Installation
If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:
Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder |
Run the following commands:
composer config repositories.aheadworks composer https://dist.aheadworks.com/ |
After the command was executed successfully, you can use the composer to install the extension.
To install the extension:
Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder |
Run the following command to install the latest version of the extension:
composer require aheadworks/module-email-templates |
if you need to install a specific version, run this command:
composer require aheadworks/module-email-templates<version> |
| Specify the version of the extension in <version> |
When prompted, enter Public Key (Username) and Private Key (Password):
Both Public Key (Username) and Private Key (Password) can be found in My Projects and Licenses in your personal account on our site:
To upgrade the extension:
To update or upgrade an extension:
Download the updated extension file. Take note of the module-name and version. Export the contents to your Magento root.
If a composer package exists for the extension, run one of the following.
Update per module name:
composer update aheadworks/module-email-templates |
Updater per version:
composer require aheadworks/module-email-templates:<version> |
Run the following commands to upgrade, deploy, and clean the cache.
php bin/magento setup:upgrade --keep-generated |
Set up cron
If you have already configured cron jobs for your Magento installation then you can skip this step. Read the following instructions on setting cron job for your Magento store: Magento user guide.-
Generally, it would be enough to run in SSH console of your server:
crontab -e |
And insert the following line:
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento cron:run |
Remember to confirm the Save request when exiting the installation.
Uninstalling the Magento 2 Email Templates & Attachments extension
Since Magento introduced declarative Database you need to be very careful when uninstalling or disabling the module.
|
NOTE: Please be very careful when uninstalling/disabling this module. This module uses a declarative DB scheme. Once the module is uninstalled its DB tables will be lost. |
Manual Removal
1. Disable the module by executing the following commands:
php bin/magento module:disable Aheadworks_EmailTemplates |
2. Remove the extension files from the following folder:
app/code/Aheadworks/EmailTemplates |
Automatic Removal (via Composer)
1. Disable the module by executing the following commands:
php bin/magento module:uninstall Aheadworks_EmailTemplates |
Extension Compatibility
|
Module Version |
Magento Version |
|
As of version 1.0.0 |
2.4.6 - 2.4.8 |
The PHP version depends on your current Magento version. Please, refer to your Magento version
Introducing to Magento 2 Email Templates & Attachments
Extension Overview
The Magento 2 Email Templates & Attachments simplifies store communication with a visual drag-and-drop editor for creating responsive templates that look perfect on both desktop and mobile. The module allows you to customize emails for orders, accounts, and newsletters while attaching custom files or dynamic PDFs (invoices, shipments, and credit memos). It also features built-in testing tools and a seamless import/export system for easy template migration.
Key Features
-
Visual drag-and-drop designer for effortless template creation via the AW Editor
-
Rich set of email blocks including headers, footers, product grids, and order totals
-
Automated email attachments for custom documents and dynamic system PDFs
-
Advanced variable system for granular control over dynamic template content
-
Native RTL support for right-to-left languages
-
Export/import to easily migrate or backup templates and media
-
Automatic plain text generation to ensure maximum email client compatibility
-
Global CSS management for consistent styling across all communications
-
Configurable tracking links tailored to specific shipping methods
Using Magento Email Templates & Attachments
Extension Configuration
To enable the extension, go to Stores > Configuration > AHEADWORKS EXTENSIONS > Email Templates and Attachments.
General settings
In the General settings section configure the core behavior of the extension:
-
Is active – set this option to Yes to enable the extension.
-
Direction – defines the text direction for the email editor and templates.
-
Left to Right – standard for most languages (English, Spanish, etc.);
-
Right to Left – should be selected for languages like Arabic or Hebrew.
-
Single template mode – defines how templates are managed across different Store Views:
-
No – allows you to assign unique templates for each individual Store View;
-
Yes – enables a unified mode where the same templates are used across all stores, simplifying management for multi-store installations with consistent branding.
-
Add plain/text version – set to Yes to automatically generate and attach a plain text version to your emails. This ensures the message is accessible in all mail clients and reduces the risk of falling into spam.
Email settings
In the Email settings section, define how product information is displayed, manage global styles, and configure tracking parameters for your email campaigns:
-
Hide SKU – set it to Yes to hide the SKU, leaving only the product name and attributes.
-
Global CSS – use this text area to enter CSS rules that will be applied to all email templates. This is useful for defining consistent fonts, link colors without editing each template individually.
-
Tracking parameters – add UTM tags to all email links for tracking traffic in analytics tools.
-
Send testing emails to – specify a default email address where test versions of your templates will be sent during the configuration process.
-
Tracking links – this grid allows you to map specific Shipping Methods to their respective tracking URLs.
-
Shipping Method – select the carrier from the dropdown list;
-
Tracking Link – enter the tracking URL provided by the carrier.
-
Action – use the trash bin icon to remove a tracking link mapping.
-
Add – click this button to create a new mapping for additional shipping providers.
Product block settings
This section allows you to predefine specific products that will appear in the product blocks of your email templates.
Enter the unique Product SKU of the product you want to feature in the corresponding slot of the email's product block.
Mass actions
The Mass actions section provides tools to automate the creation and management of all transactional email templates at once:
-
Design – select the visual style (preset) that will be applied to all newly created templates.
-
Create templates – click this button to automatically generate a full set of Aheadworks-styled templates and add them to your Magento transactional email list.
-
Delete templates – click this button to remove all email templates previously created using the AWEditor.
-
Update templates – use this button to replace standard Magento transactional emails with the custom Aheadworks versions in your store's system configuration.
-
Restore templates – use this to revert all email settings back to the default Magento transactional templates.
|
Note: These actions affect all transactional emails globally for the selected Store View. Use these tools to quickly brand your store's communication or to reset settings if needed. |
Template editor settings
In this section, manage the typography options available in the email editor:
-
Font families – list the fonts available in the editor's dropdown menu. Enter each font family on a new line.
|
Note: Use web-safe font stacks to ensure consistent display across all email clients. |
Demo/Preview data settings
Use this section to select real store data for accurate template previews in the editor:
-
Order / Invoice / Creditmemo / Shipment ID – specifies the entity ID used to populate variables during preview. Click “Choose …” button to select a specific record from your store.
Email attachment settings
This section controls the global rules for files attached to your store's emails:
-
Is Active – set to Yes to enable the ability to attach files to outgoing emails.
-
Allowed file types – list the file extensions that are permitted to be attached and sent with your emails. Use commas to separate multiple formats.
Creating and editing templates
To create a new template, go to Marketing > Communications > Email Templates.
There are two primary ways to add a new template to your store:
-
Create New with AWEditor – opens a visual drag-and-drop builder to create responsive email templates. This method allows you to design complex layouts and manage content blocks without direct editing of HTML/CSS code.
-
Add New Template – opens the standard Magento interface for working with HTML and CSS. This option allows you to either write code from scratch or instantly populate all fields by loading one of the extension's pre-configured system presets.
Create New with AWEditor
Сonfigure the following settings in the setup popup:
-
Collection / Design – choose the source for your new template:
-
-
Existing Templates – loads a design you have previously created and saved;
-
Default / Awesome – loads pre-built extension themes.
-
-
Email Template – select the specific system event this design will be used for.
-
Locale – set the language for the template. This ensures that system-generated text is displayed in the correct language for your customers.
-
Store – select the specific Store View where this template will be active.
Once a template is selected, the following fields become available:
-
Template name – an internal name for your reference in the admin panel.
-
Email subject – automatically populates with a standard subject line. You can keep this default or edit it to better fit your brand's voice.
Layout
The Layout tab contains a library of ready-to-use blocks. Drag and drop these elements onto the canvas to build your email structure without coding.
Block Categories:
-
Headers – pre-styled top sections for logos and navigation menus.
-
Content – standard sections for text, banners, and "text + image" combinations.
-
Product Grids – dynamic blocks that automatically pull product images, titles, and prices from the order.
-
Totals & Summary – formatted blocks for subtotal, tax, discounts, and grand totals.
-
Info Blocks – pre-configured sections for Billing, Shipping, and Payment methods.
-
Marketing – product recommendation blocks ("You might also be interested") and SKU-based feature blocks.
-
Footers – bottom sections for contact info, social links, and legal text.
Managing Blocks on Canvas:
-
Add – drag a block from the sidebar and drop it into the desired position on the right.
-
Move – hover over a block and use the crosshair icon to drag it up or down.
-
Delete – click the "X" icon on the left of any block to remove it.
-
Edit – click directly on any text or image within a block to modify its content.
|
Note: Placeholders will be replaced with real customer data when the email is sent. Do not remove {{tags in brackets}} to ensure dynamic data loads correctly. |
Style
The Style tab manages global design rules for the entire template.
Enable the Apply to all toggle to update all existing blocks with your changes.
Set background colors, font colors, font sizes, and font families for both primary and secondary text groups.
Clicking any text element on the canvas opens a floating toolbar for local formatting. Here you can:
-
Format text – apply Bold, Italic, or Text Alignment (Left, Center, Right, Justified).
-
Manage links – highlight text and click the Link icon to assign a URL.
-
Insert variables {{}} – access a list of system tags to insert dynamic data.
-
Switch to HTML mode for manual code adjustments.
-
Insert images within text blocks
Images
The Images tab manages the visual assets within your template. It allows you to upload new files and adjust the properties of existing images.
When you click on an image directly on the Canvas, specific controls appear. Here you can assign a URL, making the image clickable for the customer.
CSS
The CSS tab allows you to add or modify custom style rules for your template. Use this section for advanced design adjustments that are not covered by the standard Style tab.
Preview
The Preview tab allows you to visualize how your template will appear to customers on different devices before going live.
-
Full screen – opens a large-scale view of the email in a new browser window to check the overall desktop layout.
-
Mobile – opens a pop-up simulating a smartphone screen. Use this to ensure that text remains readable and that images or product grids scale correctly for mobile users.
Send
The Send tab is used to verify how your email looks and functions in a real inbox.
|
Note: To receive test emails, ensure SMTP is enabled in the Transport field and your email credentials (Username/Password) are correctly entered in Stores > Settings > Configuration > Advanced > System > Mail Sending Settings. |
Actions
-
Change info – opens a modal to manage the template's metadata and store assignment.
-
Delete template – permanently removes the current template from the system.
Add New Template
Use the Add New Template option to manually create a template using HTML and CSS. This interface allows for deep code customization and the use of Magento's native variables.
Toolbar Actions
The buttons at the top right of the page help you manage your progress and test your designs:
-
Back – returns to the previous page without saving changes.
-
Reset – reverts all fields to their last saved state.
-
Convert to Plain Text – creates a text-only version of the email for better deliverability and compatibility.
-
Preview Template – opens a window to visualize the email.
-
Save Template – saves the template and makes it available for use in your store.
Load Default Template
This section allows you to use an existing Magento system template as a starting point:
-
Template – select a base template from the dropdown list.
-
Load Template – click this button to automatically fill the "Template Content" and "Template Styles" fields with the default code of the selected email.
|
Note: Select Template that does not contain tags in square brackets ([ AWTemplate/Awesome ] and [ AWTemplate/Awesome ]). |
Template Information
Once you click Load Template, the following fields are automatically filled with pre-built content. You can use these as-is or make your own adjustments:
-
Template Name – an internal title to help you find this template in your list.
-
Template Subject – the subject line your customers will see.
-
Insert Variable... – use this to add dynamic information (like a customer's name or an order number) anywhere in your email.
-
Template Content – the main body of your email. When using a preset, it loads special code blocks that automatically pull in formatted text.
-
Template Styles – contains the design rules (fonts, colors, and spacing) that make your email look consistent.
Creating and editing templates
To create a new template, go to Marketing > Email Attachments by Aheadworks > Manage Attachments > Add New Attachment.
General Settings
This section defines the core parameters and file source for the new email attachment.
-
Name – enter an internal name for the attachment to identify it in the management grid;
-
Attachment file name – specify the filename as it will appear to the recipient;
-
Sort order – enter a numerical value to determine the display priority of this attachment if multiple files are attached to the same email;
-
Attachment type – select the source of the attachment file from the dropdown menu:
-
Custom File – choose this option to upload your own static document directly from your computer;
-
Invoice PDF – select this to automatically attach the Magento-generated PDF invoice associated with the order;
-
Shipment PDF – choose this to automatically include the Magento-generated shipment PDF;
-
Credit Memo PDF – select this to automatically attach the Magento-generated credit memo PDF;
-
Attachment file – this field appears only when Attachment type is set to Custom File. Click the Upload button to select and upload your document from your computer.
Email Templates
This section is used to specify exactly which outgoing emails should include the attachment.
Use the checkboxes in the left column to select one or multiple templates. Once you save the attachment, it will be automatically added to all emails generated from the selected templates.
|
Note: If no templates are selected, the attachment will not be sent. |
Export Templates
This feature allows you to bundle email templates and their assets for backup or migration to another store. The system generates a ZIP file containing template data, variable data (JSON), media files.
Navigate to Marketing > Communications > Email Templates. Use the checkboxes in the grid to choose the templates you wish to bundle. Select Export from the Actions dropdown menu and click Submit.
Import Templates
Use this tool to quickly restore templates or deploy them across different Magento environments.
Go to Marketing > Communications > Email Templates. Click the Import button at the upper right corner and select the previously exported ZIP file. Check the import summary to see which templates will be created as new and which will update existing records. Confirm import.