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

 

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