Improved Import / Export MAJOR UPDATE 3.0 - Excel, Json, XML, APIs, automation, mapping, attributes, consecutive run and more EXPLORE

"Magento 2 Developer’s Cookbook"

How to solve Magento 2 var/generation cannot be deleted problem

Magento 2 import export debug log

You might have already faced the var/generation cannot be deleted warning while setting up a new Magento 2 shop. However, this problem is not serious, and you can easily fix it with almost zero effort. In the following article, we shed light on the solution of the Magento 2 ‘var/generation cannot be deleted’ issue. You can find more tips here: Magento 2 Developer’s Cookbook. Continue Reading

How to get option label from dropdown in Magento 2

- Fire development, Magento 2

get option label from dropdown in Magento 2

A frequent search task among Magento developers is to get an option label from a dropdown. However, it is quite confusing for beginners since the actual value of a drop-down product attribute is a number. Many newcomers expect that it is a text. But there is nothing to worry about. Below, we explain how to get an option label from a dropdown in Magento 2 as well as shed light on everything you need to know to begin working with dropdown product attributes.  More coding tips are available here: Magento 2 Developer’s Cookbook.

Continue Reading

How to get a product by ID in Magento 2

- Fire development, Magento 2

Magento 2 get product by ID

If you want to get a product by ID in Magento 2, the platform offers several different methods to do that. And since it is one of the most frequently used operations in a programmer’s routine, we describe every approach below. Each method is unique and suitable for different use cases. You can utilize them to get products in third-party modules, scripts, or phtml files. Therefore, let’s see how to get products by ID in Magento 2. More coding tips are available here: Magento 2 Developer’s Cookbook. Continue Reading

How to get all attributes of a product in Magento 2

 

Magento 2 get attributes of a product

Below, we shed light on how to get all attributes of a product in Magento 2. Why does someone need this functionality? In some situations, you have to get a list of all available attributes for a specific product. Of course, you can spend time copying them manually, but who needs this waste of resources? Imagine that you have several thousands of attributes and you need to copy them from simple to configurable products. Let’s find out how to do that. Continue Reading