cancel
Showing results for 
Search instead for 
Did you mean: 

Email templates, new shipment

Email templates, new shipment

Hi,

I am new with Magento and I would like to configure new shipment emails, but I am having a problem with it. 

I created a new email template like the one below: 

 

{{template config_path="design/email/header_template"}}

<p>
    hi!
</p>
<p>
    tracking numbers {{block class='Magento\\Framework\\View\\Element\\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}.
</p>
<p>
    end!
</p>

{{template config_path="design/email/footer_template"}}

and another one where the block variable is replaced with the following variable which are both suggested by magento: 

 

{{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}}

 and when I create a new shipment, I receive the email but the part where the block or layout is supposed to be, it is empty in the email.

Anyone knows what is wrong? Basically, I want to display all the tracking numbers (some shipments have 2 or more tracking numbers) of the specific shipment.

Anyone has any ideas?

 

Thank you

1 REPLY 1

Re: Email templates, new shipment

Hello @enzo 

 

Follow the below blog, you will understand how the layout handle works :

https://gordonlesti.com/magento-2-email-template-layout-directives/

 

let me know if still you are not getting it.

Hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy