magmidatapumpapiでカスタムオプションをインポートする際に問題が発生しました。magmiの例のように、データを配列で渡すことで、簡単に商品をアップロードできます。
ただし、カスタムオプションモジュールをインストールして有効にすると、次のエラーが発生します。
...
$dp->beginImportSession("default","create");
// Here we define a single "simple" item, with name, sku,price,attribute_set,store,description
$item = array(
'name' => 'test a',
'sku' => 'testsku3',
'price' => '110.00',
'attribute_set' => 'Default',
'store' => 'admin',
'description' => 'ingested with Datapump API',
'meta_title' => 'test meta',
'qty' => '1',
'categories' => '2',
'weight' => '1',
'tax_class_id' => '4',
'Please enter your text:field:1:3' => ':fixed:0.5:Ref Text:35'
);
...
返されたエラー:
Notice: Undefined index: xxx:field:1 in /var/www/vhosts/websitename.co.uk/magmi/plugins/extra/itemprocessors/customoptions/pablo_customoptions.php on line 33
これで、このエラーコードは次のように解決されます...
...
public function getOptId($field)
{
return $this->_optids[$field];
}
...
これをどのように解決できるかについて誰かが考えていますか?
ありがとう!:)