0
votes

I want to update all products price. For that I want to fetch all records and then later on update the product in Magento.

$product = Mage::getModel('catalog/product');

1

1 Answers

0
votes
$product_collection = Mage::getModel('catalog/product')->getCollection();

foreach($product_collection as $product) {

    $new_price = $product->getPrice(); // Update price here.

    $product->setPrice($new_price)
           ->save();
}

This will help you to update the price of all products..