How Can I Update Magento Product Price Programmatically

How can I update the price of the Magento product programmatically

You need to load product object by ID first and then call “setPrice” method to change the Magento product price programmatically.

$store_id = 1;
$productId = 1;
$newprice = 1.00;

$product = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);
$product->setPrice($newprice );
$product->save();
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments