Closed marian-chemistdirect closed 10 years ago
This doesn't happen for me, example:
// Import intial product.
Mage::getModel('api_import/import_api')->importEntities(array(array(
'sku' => 'boolean-reset',
'_product_websites' => 'base',
'_type' => 'simple',
'_attribute_set' => 'Default',
'name' => 'Boolean reset',
'price' => '123',
'weight' => '123',
'description' => 'Boolean reset',
'short_description' => 'Boolean reset',
'status' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED,
'visibility' => Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
'tax_class_id' => 0,
'resetme' => 'Yes'
)));
// Now update the title.
Mage::getModel('api_import/import_api')->importEntities(array(array(
'sku' => 'boolean-reset',
'name' => 'Updated title'
)),
'catalog_product',
Danslo_ApiImport_Model_Import::BEHAVIOR_STOCK);
The resetme
attribute is default No
, but is still Yes
after second import (updating title).
Hi, boolean values like yes/no are reset to default after import.