How Magento send Order, shipment, invoice and creditmemo emails in Magento 2?

How Magento Send Order Related Emails or Flow of the Order Sender Mail?

Magento sends order-related emails after the order performs an action like Place order, generate Invoice, generate shipment, and credit memo.

Magento_Sales module used for sending Order related emails to the customer.
You can start debugging from the Respective PHP class for the specific email in Magento 2.
Continue reading “How Magento send Order, shipment, invoice and creditmemo emails in Magento 2?”

How to add body class before rendering the page in Magento 2?

Magento 2 add body class with pages like cms, category, product and checkout page.

You can set cutom body class for the page in Magento 2 using plugin by Magento\Framework\View\Result\Page class. Continue reading “How to add body class before rendering the page in Magento 2?”

How to check Product has custom options in Magento 2?

You can check if a product has a custom option exists (hasOptions()) or not in Magento 2 by Product Object.

Some product type contains options like Bundle and Configurable while Simple, Virtual, Grouped, Downloadable and gift card doesn’t support options. Continue reading “How to check Product has custom options in Magento 2?”