How to customize email templates per channel?
Letβs assume you have two channels in your Sylius store: TOY_STORE and FASHION_WEB. You want to personalize email content depending on which channel the customer used to place an order. This guide shows how to achieve this in a maintainable and scalable way.
To verify and manage channels in your system, open the Channels grid in the Sylius admin panel. Youβll find each channelβs code, name, and hostname.

These codes are what you will use to differentiate content in your Twig templates.
1. Identify the Email Template to Override
Original template:
To override it, copy it to:
You can find a full list of email templates in the AdminBundle, ShopBundle and CoreBundle.
2. Choose a Strategy
Depending on the number of channels and degree of customization, choose one of two strategies:
For 1β2 Channels with Small Differences
Use inline if conditions:
Best for 2β3 channels that have cosmetic differences.
For 3+ Channels or Maintainability
Use per-channel Twig includes with fallback:
Parent Template:
Example File Structure
Sample Channel Files
_default.html.twig
TOY_STORE.html.twig
FASHION_WEB.html.twig
This structure allows you to extend or localize emails without changing the parent layout.
3. Understand the Default Layout
By default, the core Sylius orderConfirmation.html.twig email looks like this:
_subject.html.twig: contains the translated subject line_content.html.twig: includes layout, order number, and optional link
You can override any of these includes or the layout itself per channel as needed.
β
Result
Each email adapts to the right channel automatically. Developers can manage templates independently, and fallback logic ensures robustness.
Youβve now implemented clean, scalable multi-channel email templates in Sylius!


Last updated
Was this helpful?
