Showing results for 
Search instead for 
Did you mean: 

Email Template for Ordered Items

Email Template for Ordered Items

hi there..

i'm trying to design the template for ordered items.. but i'm not able to align the items it self..

where i have to do this? because i didnt find anything..


can you help me?


Re: Email Template for Ordered Items

By default, Email Templates coming from Magento_Sales Module.


If you want to customization on order item of email templates,

You need to override below phtml file to your theme or module level.


Main file is,



Items of order coming from below phtml files,



Refer above files and you can customization as per your requirement.

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Email Template for Ordered Items

hi rakesh,

thanks for your answer,


i did a try but.. it stills not designed well have a look:


 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.

// @codingStandardsIgnoreFile

<?php $_order = $block->getOrder() ?>
<?php if ($_order): ?>
    <?php $_items = $_order->getAllItems(); ?>
    <table class="email-items">
                <th style="text-align:left" class="item-info">
                    <?= /* @escapeNotVerified */  __('Items'); ?>
                <th style="text-align:left" class="item-qty">
                    <?= /* @escapeNotVerified */  __('Qty'); ?>
                <th style="text-align:left" class="item-price">
                    <?= /* @escapeNotVerified */  __('Price'); ?>
        <?php foreach ($_items as $_item): ?>
                if ($_item->getParentItem()) {
            <tbody style="text-align:left">
                <?= $block->getItemHtml($_item) ?>
        <?php endforeach; ?>
        <tfoot class="order-totals">
            <?= $block->getChildHtml('order_totals') ?>
    <?php if ($this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order', $_order, $_order->getStore()) && $_order->getGiftMessageId()): ?>
        <?php $_giftMessage = $this->helper('Magento\GiftMessage\Helper\Message')->getGiftMessage($_order->getGiftMessageId()); ?>
        <?php if ($_giftMessage): ?>
            <br />
            <table class="message-gift">
                    <td style="text-align:left">
                        <h3><?= /* @escapeNotVerified */  __('Gift Message for this Order') ?></h3>
                        <strong><?= /* @escapeNotVerified */  __('From:'); ?></strong> <?= $block->escapeHtml($_giftMessage->getSender()) ?>
                        <br /><strong><?= /* @escapeNotVerified */  __('To:'); ?></strong> <?= $block->escapeHtml($_giftMessage->getRecipient()) ?>
                        <br /><strong><?= /* @escapeNotVerified */  __('Message:'); ?></strong>
                        <br /><?= $block->escapeHtml($_giftMessage->getMessage()) ?>
        <?php endif; ?>
    <?php endif; ?>
<?php endif; ?>



i want this lines aligned left...