1

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

2
  • Hi, Did you find a solution to this? I am experiencing the same issue in 2.3.5 – Nadroj467 Sep 28 '20 at 18:08
  • @Nadroj467 no solution yet, hoping it's fixed in a future release :( – kmdsax Sep 28 '20 at 19:02
2

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.

1
  • Thank you! This is the same issue I ran into. – Bernard Nov 11 '20 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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