Is it possible to create values for a multiselect attribute via CSV upload?
For example we want to populate a multiselect attribute for Car Year. We added a few sample entries and the additional_attributes data we exported was:
make=Audi,model=A3,year=1990|1991|1992
We then tried to test import a whole load more dates but these weren't created in the system, we're looking for a process where we could potentially add hundreds of entries.
Are we even close thinking this is possible…?
Thanks,
Best Answer
It is not currently natively supported by Magento.
I found a workaround to manage it. I add multi-select new options dynamically during CSV validation. It works for manual import and Schedule EE import. It is not the best because you need to reload attribute option cache for each line. If you found some optimization, please share it.
Solution:
Create a new
ImportExport
module.Add these dependencies in
etc/di.xml
:Extend the class
app/code/Vendor/ImportExport/Model/Import/Product/Validator.php
:Extend the class
app/code/Vendor/ImportExport/Model/Import/Product/Type/Configurable.php
:Extend the class
app/code/Vendor/ImportExport/Model/Import/Product/Type/Simple.php
: