I was given a task to bulk update tier prices for our wholesale site and for wholesale customer group. The solution is below, take a note that this method will remove old tier-prices and append the new one(s).

$productIds = array();
$productIds = array('1234','5678','1122','2211');
foreach($productIds as $productId) {
Mage::getModel("catalog/product")->load($productId)
    ->unsTierPrice()
    ->save()
    ->setTierPrice(array(
        array(
            'website_id'    => '2',
            'all_groups'    => '0',
            'cust_group'    => '2',
            'price'         => '99.99',
            'price_qty'     => '100'
        ),
        array() // another tier, etc
    ))
    ->save();
}

 

 

 

Categorized in: