In a Magento CE 1.9 shop, I need to update the prices & tier prices for a few thousand products daily.
The product prices I can update easily using the following helper function
Mage::getSingleton('catalog/product_action')
->updateAttributes(array($productId), array('price' => $price), 0);
To update the tier prices I unfortunately have to rely on the following which probably isn't very scalable as the whole product is saved every time:
$tierPrices = array();
$tierPrices[] = array(
'website_id' => 0,
'cust_group' => 32000, // "All Groups"
'price_qty' => $qty,
'price' => $price
);
$product->setTierPrice($tierPrices)->save();
Is there a better way to update the tier prices?