Question

I'm trying to setup a creditmemo email template in M2 Admin, but the layout handle for displaying the creditmemo items isn't getting the order and creditmemo params.

{{layout handle="sales_email_order_creditmemo_items" creditmemo=$creditmemo order=$order area="frontend"}}

When using the default creditmemo template, everything works fine: enter image description here

However when using the same layout handle in an Admin email template, creditmemo and order are always null! I also tried calling the block/template directly but the same issue persists:

enter image description here enter image description here enter image description here

The same thing is happening for the invoice email, but layout handles work perfectly fine in the new-order-confirmation email template in admin. First thought is that some other module is overriding this block incorrectly, but I haven't found any overrides.

Obviously I can override the built-in template in code and work with that, but I'd prefer to manage all the transactional emails in admin.

Any ideas or guidance would be greatly appreciated, thank you!

Magento Commerce 2.3.5

Was it helpful?

Solution

The problem is that the template is not updated to the new format.

A work-around is to set the is_legacy column to 1 in the database table email_template.

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