3
Magento:更新产品属性的最快方法
我正在寻找质量属性更新的最快,最可靠的方法。下面是我知道的方法,但是我不知道应该使用哪种方法。 $store_id = 0; Mage::getSingleton('catalog/product_action')->updateAttributes( array($product_id), array('attribute_code' => $attribute_code), $store_id ); 要么 $product->setData($attribute_code, 1234); $product->getResource()->saveAttribute($product, $attribute_code);