Before marking as duplicate go through once

I'm facing issue with overriding module-sales/view/frontend/templates/email/shipment/track.phtml

I'm using Magento 2.3.3

Answer is here but its not working. Overriding track.phtml in Magento2

I can able to override within my theme but I want some customization I would like to override with module.

I tried below:


<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="sales_email_order_shipment_renderers"/>
        <block class="Magento\Framework\View\Element\Template" name="sales.order.email.shipment.track" template="Vendor_Module::email/shipment/track.phtml">
                <argument name="tracking_url" xsi:type="object">Magento\Sales\Block\DataProviders\Email\Shipment\TrackingUrl</argument>

I tried wrapping block within referenceContainer='content' but still not working.


Make sure you check send email copy to customer while generating shipment.

NO solution worked for me provided in comments. Any other solutions ?

But doesn't seems to work for me. Any ideas ?

  • 1
    The solution you implemented worked fine for me. Make sure you copied the "email/shipment/track.phtml" template into your extension "templates" folder and also try to regenerate the "pub/static/" content by performing a deploy. Apr 1, 2020 at 17:09
  • 1
    comment <update handle="sales_email_order_shipment_renderers"/> this from your layout and check
    – Msquare
    Apr 2, 2020 at 2:47
  • 1
    If your issue is overriding template in module, have you tried, <action method="setTemplate"> in xml?
    – Korbin
    Apr 2, 2020 at 5:25
  • 1
    try this way magento.stackexchange.com/questions/308043/…
    – Msquare
    Apr 5, 2020 at 6:31
  • @AlexConstantinescu I did have you tried with Magento 2.3.3 CE and make sure while generating shipment you check "Email copy to customer". yes I copied template to my module also but not working.
    – anonymous
    Apr 5, 2020 at 10:22

1 Answer 1


Sorry can't comment, don't post much on Magento Exchange. I read through the comments. Have you read through this ticket? Make sure if you are doing a hard override you are properly including track.phtml. You might consider doing what they did and do a hard override. override the track.phtml template

  • Yes, I did same thing copied file to exact location as defined in my custom layout. What's that xml part that I didn't get.
    – anonymous
    Apr 8, 2020 at 7:27

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.