#$obj (stdClass Object), $obj->products_id = given int value
$product = Mage::getModel("catalog/product")->load($obj->products_id);
$product->setId($obj->products_id); //not working, the session is cancelled
$product->setEntityId($obj->products_id); //not working, the session is cancelled
$product->setProductId($obj->products_id); //working but in "catalog_product_entity" the "entity_id" is created using the auto-increment (from the last registered ID)
//-------------------------------------------------
$product->save();
//-------------------------------------------------
$product->getId(); //loading the "entity_id"
$product->getProductId(); //loads the product id
我想要做的是.. 将 $obj->products_id 加载到“entity_id”(“catalog_product_entity”)中。
有什么建议么?!相同的逻辑已应用于“目录/类别”并且它有效但在“目录/产品”上不起作用..
谢谢你