Category: Magento 2 (page 1 of 30)

How to Get Customer Data By Customer Email in Magento 2

In this post I am going to explain how to get customer data by customer email Magento 2. Using below code snippet you can get customer data by passing customer email and website id. Add below code snippet in Block class.

Add below code snippet in template file.

That’s it. Enjoy Magento 2!!…

Magento 2 – How to get Magento 2 Edition and Version

In this post I am going to explain how to get Magento 2 edition and version. 1. Using Dependency Injection Add below code snippet in Block class.

Add below code snippet in template file.

2. Using Object Manager

It will return edition name like Community or Enterprise and the version like 2.3.5-p1….

Magento 2 – How To Get System Configuration Value in phtml File

In this post I am going to explain how to get system configuration value in phtml file in Magento 2. You can get system configuration field value programatically as below. Add below code snippet in Block class.

  Add below code snippet in template file.

  Thats it. Enjoy Magento 2!! Team HiddenTechies…

Magento 2 – How to Unlock Admin User via Command Line

In this post I am going to explain how to unlock admin user via command line in Magento 2. First login to SSH panel and navigate to Magento 2 setup root. Run the following command. It will show usage of the command.

Output: Description: Unlock Admin Account Usage: admin:user:unlock <username> Arguments: username The admin…

Magento 2 – How to Hide Admin Menu Based on System Configuration

In this post I am going to explain how to hide admin menu based on system config in Magento 2. In order to add admin menu we write code in menu.xml file, which is located at <vendor>/<module>/etc/adminhtml/. So now let’s see how you can hide menu based on conditions. Check the below code snippet.

Magento 2 – How to Get Creditmemo Details by Order Id

In this post I am going to explain how to get creditmemo details by order id in Magento 2. Using below code snippet you can get creditmemo details by passing order id. 1. Using Dependency Injection Add below code snippet in Block class.

  Add below code snippet in template file.  

 …

Introducing Etrend – Best Converting Magento 2 Theme!

Meet Etrend Magento 2 Theme built specifically for increase conversion and drive more sales. We’re so exited to share this brand new theme with you. In this post, we’ll unpack Etrend’s exciting features and how they can help you drive more sales. To see it in action, go ahead and check out Etrend demo. Increase…

Magento 2 – How to Create and Call Modal Popup Widget

In this post I am going to explain how to create and call modal popup widget in Magento 2. First, you need to create a “mymodal.js” file at below path. Path: app/code/<vendor>/<module>/view/frontend/web/js/mymodal.js  

  After creating js file, create a “requirejs-config.js” at file below path and add/call js in it. Path: app/code/<vendor>/<module>/view/frontend/requirejs-config.js  

Magento 2 – How to Get Customer Data By Customer ID

In this post I am going to explain how to get customer data by customer id Magento 2. Using below code snippet you can get customer data by passing customer id. Add below code snippet in Block class.

Add below code snippet in template file.

  Team HiddenTechies Write an article about ecommerce…

Magento 2 – How to Disable Payment Method Programmatically

In this post I am going to explain how to disable payment method programmatically in magento 2. First, We need to write the “payment_method_is_active” event, which checks on checkout for payment method availability. So, we are going to create event.xml file on below path. Path: app/code/Ht/Mymodule/etc/

Next to that, we are going to create…

Older posts