How to get Role Permissions by Role Id in Magento 2?

A simple method for retrieving role permissions in Magento 2 based on role id using the PermissionProvider class.


0 Comments5 Minutes

How to Enable Maintenance Mode in Magento 2?

Enabling maintenance mode in Magento 2 is a crucial step when performing updates or troubleshooting your store. This…


0 Comments4 Minutes

How to Get Admin URL in Magento 2

Learn how to retrieve the Admin URL in Magento 2 using the command line, programmatically, or via the database.


0 Comments2 Minutes

Deprecated Functionality: strip_tags(): Passing null to parameter #1

Fixing deprecated Functionality: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated


0 Comments1 Minutes

How to Use ViewModel in Magento 2: A Simple Guide

Instead of stuffing your block classes with business logic, you can use ViewModels to handle specific tasks related to…


0 Comments5 Minutes

How to Remove Sample Data from Magento 2

Discover the step-by-step process of removing sample data from your Magento 2 installation in my latest blog post. I'll…


0 Comments2 Minutes

Create CMS Block Programmatically Magento 2

In today's tutorial, we are going to learn how we can create CMS blocks programmatically in Magento 2.


0 Comments7 Minutes

Patch to Debug Blocks and Containers in Magento 2

Today, I will share a patch I created to show comments in the page source. It will not affect the front end and not be…


0 Comments2 Minutes

How to validate email address in Magento 2 programmatically?

In Magento 2, You can use the native Magento\Framework\Validator\EmailAddress class to validate email address…


0 Comments2 Minutes

Privacy Preference Center