Here a simple script to create tier prices programmatically
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | $product = Mage::getModel( 'catalog/product' )->load(904); $product ->setPrice( $tarif ->getPrix()); $tier_price = array (); foreach ( $tarif ->getQtyDetails() as $detail ) { $tier_price [] = array ( 'cust_group' => 32000, 'website_id' => 0, 'all_groups' => 1, 'price_qty' => $detail ->getMin(), 'price' => $detail ->getPrix(), 'website_price' => $detail ->getPrix(), ); } $product ->setTierPrice( $tier_price ); |