Simple tricks to use Declarative Schema Magento 2.3

Magento 2.3 has announced a new feature, called Declarative Scheme, which plays an important role in going beyond the installation and updating of the scheme process. Previously, in all versions of Magento, developers used to write a PHP script to install and update setup script data in the database. The Magento Schema Listener tool converts the Magento 2.3 migration script into a declarative schema. The declarative scheme approach allows developers to declare the last desired state of the database and …

Read More

The Basics Concepts of Magento Cache – How To Use Cache

Magento can manage to cache at many levels in the system, most of which are transparent to developers who are not familiar with development in depth. As the complexity of your work with Magento has increased, it is imperative that you ultimately require caching yourself. Caching Concepts cache in Magento looks like many other systems that it stores a key-value. If we want to save $data in the cache, we need to treat them with a name, $key. When we …

Read More

What is the Basic difference between type and virtualType

Hello everyone, sometimes you are in a situation where you need to use the class, for example, the collection of the sales order grid (Magento\Sales\Model\ResourceModel\Order\Grid\Collection) (Sales_order_grid UI components) But you need to use a different value for the parameter, for example, you want to change $resourceModel. If you don’t know about virtualType yet, you will have to create a new class that extends Namespace\Modulename\Model\ResourceModel\Orders\Grid\Collection and overrides the value. With the help of virtualType, you can do like this: That’s everything …

Read More