How to setup stores and website using config.php file Magento 2?

config.php file in Magento contains the list of installed modules, Website, Store related setup, Locales, and system configuration settings.

You can see the config.php file location at the given path, app/etc/config.php

I will just highlight the Scopes section of the config file.

There will be different sections to be used within the config.php file.h

1. modules (Out of the box modules section contains the List of Modules available.)
2. scopes (This section contains the stores, store groups, and websites related information.)
3. system (This section is used to set system configuration value.)
4. themes (This section is used to setup themes related information.) Continue reading “How to setup stores and website using config.php file Magento 2?”

How to override address/book phtml in Magento 2?

You can override the book.phtml file in Magento 2 using XML.
Book template used to display the address book of the customer with default billing and shipping address at the top of the Address book page.

Magento\Customer\Block\Address\Book

Book Block class contains the native method for the template.
You can override using theme or module level, Continue reading “How to override address/book phtml 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?”