Question

When sending the tracking email in Magento 2 we are running into some major issues.

Using the default Luma shipment email {{trans "%name," name=$billing.name}} This part always comes out as a single comma as if its failed to retrieve the name.

and {{layout handle="sales_email_order_shipment_track" shipment=$shipment order=$order}} this section is always missing from the email.

I added a little bit of logging into the track.phtml which is responsible for it and from what I can see <?php $_shipment = $block->getShipment() ?> that bit of code always simply returns null, along with ```getOrder() ?>''' .

Since they come back as null the if check never works and they the tracking is never added, what I am wondering is why these would ever be null?

Every other email seems to work fine but for some reason shipping always just finds these 2 fields as null.

Was it helpful?

Solution

This is due to a bug in 2.3.4 - 2.3.5,

Can be resolved by setting the is_legacy field to 1 in the email_template table.

Click here for github issue related to this

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top