Check JS minify or not programmatically in Magento 2.

Magento 2 has native feature to JS Minify from the Configuration Setting admin panel.

To Minify JavaScript files in Magento 2 Via admin panel,
Go To Admin panel,
Click Stores -> Settings -> Configuration from the left sidebar.
Select Developer Tab under the Advanced from the left sidebar,
Open the JavaScript Settings section,
Minify Javascript file to Yes,
Click on Save Config. Continue reading “Check JS minify or not programmatically in Magento 2.”

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?”