Browsed by
Month: December 2016

How to Create a Category Image Attribute in Magento 2

How to Create a Category Image Attribute in Magento 2

Creating a custom Category Attribute with an image upload is quite common feature requirement in our shops. So this blog-post will be about the steps you have to take to create a custom category attribute with an image upload in Magento 2. The post turned out to be quite long, but I wanted to provide a complete description of all steps necessary. So stay with us if your interested 🙂 Our Module is called Dev98_CategoryAttributes and the image attribute will be called…

Read More Read More

How to create attribute-options in Magento2

How to create attribute-options in Magento2

Recently we had to create Configurable Products in our Product Import. To create those products we had to make sure that all simple products are generated before the configurable products and that all the attribute options for our configurable attribute are available. So this post will focus on how to create those attribute options and a problem where we had to spend some time figuring out. Preface We need to create those attribute options before we call $this->magentoImporter->validateSource($dataSource); otherwise the…

Read More Read More

How to adjust increment-ids in Magento 2

How to adjust increment-ids in Magento 2

Maybe almost every Magento developer has had the task to customize the increment-ids for orders or customers in Magento. Recap Magento 1 In Magento 1 you had to change the column increment_prefix  in the table eav_entity_store . I am sure there are modules out there that let you achieve that in convenient way. We have done that by using Setup-scripts most of the time. When a new store is created you need set the increment_prefix afterwards and do so for all entities that you…

Read More Read More

Creating Configurable Products

Creating Configurable Products

Basically there are different ways for creating Configurable Products in Magento2 (like in Magento1). You can create it using the Admin Panel, using a Setup\InstallData or Setup\UpgradeData class or during a custom import. ADDING THE ATTRIBUTE Let’s assume we are creating our attribute using the Setup\UpgradeData class in our module. The code we might initially create could look something like the following:

The above code will create an attribute with the attribute-code ‘dev98_diameter’, which is available for simple and configurable products, within…

Read More Read More