Blog

Importing lots of attribute options into the backend of Magento 2 can be tedious at best but we’ve got a solution to speed up the process massively.
When you need to add 10s or even hundreds of different attribute options it can take a long amount of time and Magento gets slower and slower with each one added.

We’ve created a quick jQuery snippet you can add into the console to speed through the process. This will work by putting all your new options into a big array and going through each option one by one.

By changing the ‘existingarray’ to your comma separated list and running this in console it’ll quickly add all the options in the list.

We’d recommend using a backtick as it allows any options that have speech marks such as foot and inches `3’ 2”`.

We’ve also added a lot of fallbacks to make sure we’re not adding any data incorrectly.

It checks that the data in the array is unique so you won’t run into any issues where you have to delete options after the script runs.

By Ben

18 / 03 / 2021

Magento
eCommerce

Magento is the leading solution for eCommerce, and we’re specialists. Magento is easy-to-use, completely customisable and endlessly scalable.

Header Image

Bespoke
Builds

We offer custom web development services for any requirement. Manufacturing from scratch, we deliver a project entirely tailored to your needs.

Header Image

Working with brands nationally from our offices in Cardiff and Cornwall, our tenacious team of designers and developers deliver sophisticated results every time.

It looks like you're offline - You can visit any of the pages you previously have