Magento 2 Disable Two Factor Authentication Module

From Magento 2.4.x, the 2-factor authentication for the admin is by default enabled. In some situations, if you are not able to set up 2 factor authentication for your admin user then you can not log in to the Magento admin. These situations such as you are setting up Magento 2.4.x in the localhost, or you are creating a new admin user in any server in which emails are not sent, or you do not have access to the email account.

Continue reading “Magento 2 Disable Two Factor Authentication Module”

Magento 2 Call Custom Variables in phtml File

Custom variables are a powerful feature of the Magento 2, each Magento developers are aware of this but only a few are taking the benefit of Magento 2 custom variables. Using Magento 2 Custom Variables, you can display any text and/or HTML from admin to front-end, using this website admin or merchant can easily update the content of the website without any modification in the code and especially without being dependent on the developer.

Continue reading “Magento 2 Call Custom Variables in phtml File”

Magento 2 Get Module Directory Path Programmatically

As per my experience, many times we have to get the location of the module or module directory path while creating the custom module and especially it’s either shipping or payment module. E.g when we wanted to know the exact path of certificate file added to our custom module’s etc folder or .wsdl file of third party module added in our modules.

Continue reading “Magento 2 Get Module Directory Path Programmatically”