I have a problem about add product tier price by code. I did some research that there is a magento API that could be used to add tier price. However, since I have customized our magento and add a new field to the tier price, which is "production time", I don't know how to add tier price via API anymore.
Here is the sample code
$proxy = new SoapClient(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'/api/soap/?wsdl');
$sessionId = $proxy->login('API user','API Key');
$tierPrices[] = array(
'website' => 'all',
'customer_group_id' => 'all',
'production_time => $data[2],
'qty' => $data[3],
'price' => $data[4]
);
try {
$proxy->call($sessionId, 'product_tier_price.update', array($sku, $tierPrices));
} catch (Exception $e) {
$e->getMessage() . "
";
}
I will get an error says "invalid tier price".
Any idea why does it happen? or is there other ways to add tier prices?
Thank you.