2

I'm trying to add custom options for my products, using import product tools.

This is how my csv file looks like:

sku,custom_options
1001BG,"name=Line 1,type=field,required=0,price=0.0000,price_type=fixed,sku=,max_characters=5"

This is the error I get:

"General system exception happened"

Any hint is appreciated.

P.S.: I tried to Convert to UTF-8-BOM, still not working.

I use Magento CE 2.1.3.

8

Custom options are processed in

\Magento\CatalogImportExport\Model\Import\Product\Option::_parseCustomOptions()

There is line

1859 $options[$name][$k]['_custom_option_store'] = $rowData[Product::COL_STORE_VIEW_CODE];

Expectations here are that your CSV file contains column store_view_code. In case the column is absent, E_NOTICE is triggered.

For every error Magento generates an exception. So here low level exception with next text is throwed:

Notice: Undefined index: store_view_code in /var/www/html/magetwo.vg/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php on line 1859

To solve this just add empty column store_view_code to CSV file

sku,store_view_code,custom_options
1001BG,,"name=Line 1,type=field,required=0,price=0.0000,price_type=fixed,sku=,max_characters=5"

protected by Community Mar 22 '18 at 10:48

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.