Why & How to Implement Virtual Types in Magento 2?

Likes (1)   Dislikes (0)  
  (1 reviews)

Virtual Types in Magento 2 is something that is not an actual class implemented anywhere in our module file system. Rather it is a configured class that is generated automatically for us by Magento 2 code generation library. Yes, we have to just configure a Virtual Type definition in our di.xml file and run the

How to write log to custom files in Magento 2

Likes (2)   Dislikes (0)  
  (2 reviews)

Logging is a very important aspect of any programming language. Logs help us debug our code and finally identify issues in it. We do write logs to keep track of things, to debug our code and to report errors in any programming language. Magento 2 provided us a great logging library from PSR. But this

How to Collect Totals In Magento 2 Application

Likes (2)   Dislikes (0)  
  (2 reviews)

For a merchant the default Magento business implementation is not always enough. They always demand something that can add to their revenue💰. As a developer we should have this knowledge to implement or showcase them the way Magento 2 adds additional costs💲on top of the existing features. In this tutorial we will learn about the

How to use Magento 2 ViewModel like a Pro

Likes (3)   Dislikes (0)  
magento2-view-models

This is just a thing of personal preference how would you like to manage your code and all that. Stop using old school Blocks or Helpers for reading data and providing to PHTML. Use new PSR compatible ViewModels concept instead. Follow the Separation of Concern principle to the fullest. Make your code more readable, maintainable and reusable. Inject your ViewModels via layout and start consuming them from views.

How to Configure Redis on Magento 2 Using Docker Compose

Likes (1)   Dislikes (0)  

Redis is a key value pair in memory database. This is incredible fast for data retrieval. We can use Redis for cache and session storage. Magento 2 has an optional implementation of Redis for both cache and session storage which we can configure if required. In most of the production Magento 2 websites you will see the Redis integration. In this tutorial we will integrate Redis with docker compose for Magento 2.

How to Permanently Remove Unused Core Modules in Magento 2

Likes (2)   Dislikes (0)  
remove unused magento 2 core modules

Certain core modules in Magento 2 application is absolutely of no use for certain businesses. Business owners ask developers to remove those modules from the application to make it run faster. Also these additional modules capture your disk space which you definitely don’t want. Get rid of those annoying core modules in your Magento 2 application using amazing COMPOSER feature.

How to log using FirePHP in Magento 2

Likes (1)   Dislikes (0)  
PHP logging with FirePHP in Magento 2

As a developer logging crucial debug information is an unavoidable part of our coding process. We all do write logs at places in our code for later use and investigation. These logs help us to understand what went wrong in some parts of the code so that we can debug that section of the code

How to create or change Magento 2 admin password

Likes (1)   Dislikes (0)  
  (1 reviews)
how-to-create-or-update-an-admin-user-account-for-magento-2

Sometimes we forget our admin password for our Magento 2 development instance because we usually deal with multiple development instances. Also in most cases, there is no mail service available in a development environment. Hence we could not raise a “forget password” request either. In this case, we can create another admin user from the

How to setup Magento 2 on Docker for development

Likes (1)   Dislikes (0)  
Setup Magento 2 on top of Docker

In this tutorial, we will set up Magento 2 development environment on top of Docker. We will install a fresh Magento v2.4.5 on Docker. Assuming we have nothing yet, no code base no database, etc. Everything we will start from scratch on the docker container. We will prepare a docker-compose file for Magento 2 setup