In the shipping email template, I have a code to show the tracking number in the shipment email.

I have the following code in my new shipment template for tracking code :

{{block class='Magento\Framework\View\Element\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}

but when I send shipment mail I didn't get the tracking number in my email.

Could anyone please suggest to me how can i fix this?

1 Answer 1


Try this:

{{layout handle="sales_email_order_shipment_track" shipment_id=$shipment_id order_id=$order_id}}
  • I am using block as well layout but both not working and tracking info is not available in shipment email {{layout handle="sales_email_order_shipment_track" shipment_id=$shipment_id order_id=$order_id}} {{block type='core/template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}
    – ishaq
    Jul 18, 2023 at 9:58
  • app/design/frontend/vendor/theme/Magento_Sales/layout/sales_email_order_shipment_track.xml file contains ferenceBlock name="sales.order.email.shipment.track"> <action method="setTemplate"> <argument name="template" xsi:type="string">Magento_Sales::email/shipment/track.phtml</argument> </action> </referenceBlock>
    – ishaq
    Jul 18, 2023 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.