Search by

agrekom / customization-email-template

macpain

Customization for Magento email templates

Package info

bitbucket.org/agrekom/customization-email-template

Type:magento2-module

pkg:composer/agrekom/customization-email-template

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

v2.0.0 2026-10-13 11:26 UTC

This package is auto-updated.

Last update: 2026-11-04 16:17:03 UTC


README

Magento 2 module that registers the Agrekom_CustomizationEmailTemplate namespace for Agrekom's email-related customizations.

What this module does

The module registers the component with Magento and sends the additional order email described below.

The order item customizations for transactional emails are implemented as theme template overrides, not inside this module, in:

  • app/design/frontend/creativestyle/theme-agrekom/Magento_Sales/templates/email/items/order/default.phtml
  • app/design/frontend/creativestyle/theme-ewarsztat/Magento_Sales/templates/email/items/order/default.phtml

Both themes extend Creativestyle/theme-creativeshop, which is why the same override exists in both — there is no shared parent template between them to put it in only once.

Order confirmation email — item rendering

The order item block in the "Items" table was extended compared to Magento's stock template:

  • Product image — a small (80×80) thumbnail is rendered to the left of the product name, using a dedicated image type sales_email_order_item defined in app/design/frontend/creativestyle/theme-creativeshop/etc/view.xml.
  • SKU — shown under the product name (kept from Magento core; resolves the simple product's SKU for configurable products via getSku()).
  • EAN — shown under the SKU, only when the product has a value for the ean attribute. If the attribute is empty or not set, the line is omitted entirely.

Layout is done with an inline-styled nested <table> (image cell + details cell) rather than relying on compiled LESS classes, since transactional emails are generated from the pre-compiled css/email.css and won't pick up new LESS rules without a static content deploy — inline styles keep the layout correct regardless of deploy state.

Additional order email

Whenever OrderSender::send() actually sends the order confirmation, the SendAdditionalOrderEmail plugin also sends a separate email to the configured recipients (one message per recipient, the customer never receives it). This includes asynchronous sending and manual resends from the admin panel.

  • Configuration: Stores > Configuration > Sales > Sales Emails > Order - Additional Email (sales_email/order_additional/enabled, sales_email/order_additional/recipients — comma-separated).
  • Defaults (etc/config.xml): disabled globally; enabled for website uk with hello@agrekom.co.uk.
  • Template: view/frontend/email/order_additional.html, based on the core guest order template. It passes show_additional_ean="1" to the items layout, which makes the theme overrides above render the additional_ean attribute under the EAN. The line is omitted when the attribute is empty, and configurable items read the value from the ordered variant.

Why a separate module exists at all

Having a dedicated module gives Agrekom's email customizations their own identity in app/etc/config.php and module:status, independent of the theme. This matters because:

  • it can be enabled/disabled on its own without touching theme registration,
  • future PHP-level customizations (e.g. plugins/preferences for Magento\Sales\Model\Order\Email\Sender, custom email variables, observers) have a natural home here instead of being bolted onto an unrelated module,
  • it keeps an explicit audit trail in setup_module / module:status of what "email template customization" means in this codebase.

Known history / gotchas

  • etc/module.xml previously declared the wrong module name (MageSuite_LowestPriceLoggerFrontend, a leftover copy-paste from agrekom/customization-magesuite-lowest-price-logger-frontend), which conflicted with that other, legitimate module and meant Agrekom_CustomizationEmailTemplate was never actually enabled. This has been fixed — module.xml now correctly declares Agrekom_CustomizationEmailTemplate, matching registration.php.
  • After changing etc/module.xml (name, sequence) run:

    bin/magento module:enable Agrekom_CustomizationEmailTemplate
    bin/magento setup:upgrade
    

Requirements

  • magento/framework (see composer.json)