, , , , .
/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Backend/Tierprice.php , savePriceData. , , , .
if, , $priceObject, .
, priceObject value_id . catalog_product_entity_tier_price. , if
, priceObject catalog_product_entity_tier_price (entity_id, all_groups, customer_group_id, qty, value website_id). Magento catalog_product_entity_tier_price.
, script (aka ) priceObject, . , , , .
, , , . if , , , , . :
... first part of if statement
$reader = $this->_getReadAdapter();
$sql = "SELECT * FROM catalog_product_entity_tier_price WHERE ";
foreach($data as $index => $value) {
$sql .= $index . ' = ' . $value . ' AND ';
}
$sql = substr($sql, 0, -4);
$search = $reader->fetchAll($sql);
if(count($search) > 0) {
} else {
$adapter->insert($this->getMainTable(), $data);
}
, , , (, , , ). , , 100% Magento , ASAP.
, , ,
(. Enterprise Edition Magento, , , )