Sharing some useful tips, solutions and notes for Geeks.

Wednesday, May 13, 2020

Bulk create attribute sets programatically in Magento 2

Sometimes when we load data to Magento, there might be cases where data need to load with specific new Attribute Sets. If its one or two, we could easily create it. What if its around 50plus !!!

So my quick solution provided below will makes things easy.

Create a CSV file with all needed attribute sets like below:

After that save that CSV file and upload in the document root of the Magento 2.

Now create another php file in the same document root and load below code into it. Once done, please call in the browser and all the attribute sets in excel will get uploaded.

Dont forget to change the csv file name with yours in code.

Easy peesi :)

No comments: