/** * Set correct item prices ((original price / new qty) * old qty) * * @param Mage_Sales_Model_Order_Item $orderItem * @param int $oldQty * @param int $newQty * @return Mage_Sales_Model_Order_Item */ protected function _correctPrices($orderItem, $oldQty, $newQty) { $orderItem->setPrice($orderItem->getPrice() / $newQty * $oldQty); $orderItem->setBasePrice($orderItem->getBasePrice() / $newQty * $oldQty); $orderItem->setOriginalPrice($orderItem->getOriginalPrice() / $newQty * $oldQty); $orderItem->setBaseOriginalPrice($orderItem->getBaseOriginalPrice() / $newQty * $oldQty); $orderItem->setPriceInclTax($orderItem->getPriceInclTax() / $newQty * $oldQty); $orderItem->setBasePriceInclTax($orderItem->getBasePriceInclTax() / $newQty * $oldQty); return $orderItem; }