Fixed: Product Details Missing in Order Confirmation Email After Upgrading to Magento 2.4.x
Howdy Magento guys? 😃
Are your customers complaining about product details missing in order confirmation email after upgrading to Magento 2.4.x?
Well, you’re not alone!
Many of the merchants are facing the ‘missing order item details in Magento 2 order confirmation email’ issue after upgrading to Magento 2.4.x. The issue is generally detected among the stores using custom email templates for order confirmation.
I’m here to help you fix the missing product item details in Magento 2 order confirmation email.
Order confirmation mail acts as an acknowledgment of the successful order placement. Magento 2 automatically sends order confirmation emails to customers with the following essential information:
- Ordered products
- Total price
- Billing information
- Shipping addresses
Recently, one of our clients rushed to me regarding the ‘item details missing in the order confirmation email after upgrading to Magento 2.4.x’ issue.
I dug down the root cause of the issue and found a solution that works. ✨
Read this blog post till the end to solve the product details missing in order confirmation email after upgrading to Magento 2.4.x issue.
How to Fix Product Details Missing in Order Email After Upgrading to Magento 2.4?
On investigating the problem, I found that there was some issue with variables in the Magento 2 email template. All you need to do is find & replace the {{layout handle="sales_email_order_items" order=$order area="frontend"}}
with {{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}}
in the order confirmation email template.
Still confused? Just follow these steps:
- Step 1: In your Magento 2 admin panel, navigate to Stores > Settings > Configuration.
- Step 2: In the left panel, expand the Sales tab and click on Sales Emails and check which email template your store is using for the order confirmation emails. (which is New Pickup Order in this case)
- Step 3: Now, go to Marketing > Communications > Email Templates and select the same email template to edit it.
- Step 4: In the Template Content section, find
{{layout handle="sales_email_order_items" order=$order area="frontend"}}
and replace it with
{{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}}
- Step 5: Save the template and you’re done!
This will fix the ‘Product details missing in Magento 2 order confirmation mail’ issue. 😊
If you still have any doubts or queries, feel free to comment.
Call me ‘Magento post-upgrade bug buster’; I also found solutions to some other issues that merchants are facing after upgrading.
If you’ve recently upgraded your store to Magento 2.4.x, you may also find these solutions helpful:
- Magento 2.4.x Elasticsearch Error: Text Fields are Not Optimised for Operations
- Admin Login Not Working After Upgrading to Magento 2.4.4
- Admin Menu Not Working After Upgrading to Magento 2.4.4
- Solved: Undefined Index: DirectiveName in SimpleDirective.php in Magento 2
Problem solved? Let me know by rating this post with 5 stars.
Also, share this post with the Magento community via social media. (because sharing = caring) 🙂
Thanks for reading! 🍀
8 Comments
Not worrking for me, im using custom email template and custome theme
Hey,
In your custom email_template search for order_items block and change the order to order_id
Great solution. If you load new template it will work too
Thank You Simon, we feel grateful!
Hi,
I already extends my order emails in my custom design folder, then how come it loads from admin email templates. little bit confusing.
Hey Raja,
You do not have to override templates,
You just need to edit the existing templates in admin at marketing tab.
Thank you for the Magento guide that solve my problem! 😀
Thank You Jens, For Your Appreciative Feedback!