3

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.

1
  • Is there any error from log? Commented Feb 4, 2017 at 5:16

1 Answer 1

10

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"
0

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