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.

Formerly known as Magento, Adobe Commerce is built for complex catalogues, integrations, and long term growth. We design and develop stable, scalable stores that support demanding eCommerce requirements, including multi-store setups, complex pricing, and Hyva based performance improvements.
We design and build custom eCommerce platforms for businesses with complex workflows, integrations, or non standard requirements. Built from scratch around your business needs using Laravel and modern architectures.
Working with brands across the UK from our offices in Cardiff and Exeter, you deal directly with a senior team of designers and developers specialising in Shopify, Magento, WordPress and bespoke eCommerce platforms.
We focus on commercial outcomes. Better conversion rates, strong SEO foundations and eCommerce platforms that continue to improve long after launch.