How to override login.phtml template in Magento 2?

You can override login.phtml file using layout XML way or directly add template file to the theme level under Magento_Customer theme module.

login.phtml file used to display login form in Frontend area.

Theme Level Override,

app/design/frontend/<ThemePackage>/themename/Magento_Customer/templates/form/login.phtml

Module Level Override,

You can see a base definition for define login.phtml file at customer module, Magento_Customer/view/frontend/layout/customer_account_login.xml location. Continue reading “How to override login.phtml template in Magento 2?”

How to override form/register.phtml template in Magento 2?

You can override register.phtml file using layout XML way or directly add template file to theme level by theme module.

register.phtml file used to display a Customer registration form in frontend.

Block name is customer_form_register which contains the register.phtml template.

you can see registration form by URL, <SITE_URL>/customer/account/create Continue reading “How to override form/register.phtml template in Magento 2?”

How to get Dependent(Sequence) module list of a specific module programmatically in Magento 2?

You can get the list of dependent module and schema version for a specific module using programmatically by Magento\Framework\Module\ModuleList class.

You can manually check the list of the dependent module for a module using an etc/module.xml file.

Let’s we Check the dependency list for a Catalog Module. you can check the module.xml file for catalog module is,

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Magento_Catalog" >
        <sequence>
            <module name="Magento_Eav"/>
            <module name="Magento_Cms"/>
            <module name="Magento_Indexer"/>
            <module name="Magento_Customer"/>
        </sequence>
    </module>
</config>

you can check above XML, There are four modules on which catalog is dependent.  Continue reading “How to get Dependent(Sequence) module list of a specific module programmatically in Magento 2?”