Author Publishing

Magento2 Object Pool Pattern

Magento2 Object Pool Pattern

Introduction Magento2 introduced us with many design patterns, I have also discussed some of them in my previous articles: Dependency Injection In Magento2 Magento2 Repository Design Pattern Magento2 Service Contract Magento2 Proxy Design Pattern And Code Generation Today we will be discussing another design pattern Object Pool Design pattern and how it is used in […]

Read More

Working With Database Transactions In Magento2

Working With Database Transactions In Magento2

Introduction In a structure like magento2, it is very difficult to guarantee the consistency of data, the system of EAV(Entity Attribute Value) makes magento2 highly scalable and modular but every thing comes with a cost, managing the data in these structures can be very difficult. To ensure the consistency of data, magento2 uses database transactions. […]

Read More

Magento2 Store Emulation

Magento2 Store Emulation

In a system like Magento2, it’s quite difficult to handle some situation while coding like updating the data according to correct scope, people end up with the ideas like changing the store scope by using setCurrentStoreId() ┬ámethod like below: $currentStoreId = $this->_storeManager->getStore()->getId(); // Magento\Store\Model\StoreManagerInterface $this->_storeManager->setCurrentStoreId($storeId); // … // your code // …. $this->_storeManager->setCurrentStoreId($currentStoreId); and then […]

Read More

Magento2 RESTful API with Swagger UI

Magento2 RESTful API with Swagger UI

Today we are going to understand how to use magento2 swagger ui, magento2 provides REST API for accessing magento resouces from any other devices, magento2 REST API is based on OpenAPI Specification(OAS) (or Swagger Specifications), OAS are meant for how we can describe, structure, and visualize api resources. Any one who follows swagger specifications can […]

Read More