set Tier Prices programmly

			
			//tire price
			$tierPrices[] = array(
					'website_id'  => 0,
					'cust_group'  => 32000,
					'price_qty'   => $row['qty_1'],
					'price'       => $row['price_1']
			);
			//Second defined tier price
			$tierPrices[] = array(
					'website_id'  => 0,
					'cust_group'  => 32000,
					'price_qty'   => $row['qty_2'],
					'price'       => $row['price_2']
			);
			
			//Now we set the tier price and save the product
			$product->setTierPrice($tierPrices);
             $product->save();

 

你可能感兴趣的:(set)