magento前臺通過代碼編輯產品

$product = Mage::getModel('catalog/product')->setStoreId(0);
 $product->load(5875);
 //Mage::app()->setCurrentStore(0);
 echo $storeId = Mage::app()->getStore()->getStoreId();
 $product->setData('name','5555');
// $product->save();

注意設置 //Mage::app()->setCurrentStore(0); 爲 0

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章