Magento 2 – How to Add CMS Block to Email Confirmation Email

cms-blockemail-templatesmagento-2.1magento2

In magento 1 we can add CMS blocks like this {{block type="cms/block" block_id="my_block"}}, I've tried this in Magento 2 but does not work. Is there a way of adding a CMS into an email template? For instance /vendor/magento/module-sales/view/frontend/email/order_new.html

Best Answer

Should create new custom theme

And then, copy the default email template to your custom theme:

app/design/frontend/Vendor/Theme/Magento_Sales/email/order_new.html

Add cms block to email template

{{block class="Magento\\Cms\\Block\\Block" area='frontend' block_id="my_block"}}

We can see more:

vendor/magento/module-sales/view/frontend/email/shipment_new.html
vendor/magento/module-sales/view/frontend/email/shipment_new_guest.html