Magento Certified Developer GuideCategory: 9. SalesHow does Magento calculate price when an order is created from the admin
Manish Prakash Staff asked 5 years ago

Magento uses the same ‘sales/quote’ model to calculate order totals.

When we place order from admin, we have option to set custom price for a product. The way its implement is:
1. In the subtotal totals model (sales/quote_address_total_subtotal), in the collect() function this code is there $item->calcRowTotal();

2. The calcRowTotal() instead calls the getCalcuationPrice() which is defined as

public function getCalculationPrice()
        $price = $this->_getData('calculation_price');
        if (is_null($price)) {
            if ($this->hasCustomPrice()) {
                $price = $this->getCustomPrice();
            } else {
                $price = $this->getConvertedPrice();
            $this->setData('calculation_price', $price);
        return $price;

Here we see the use of getCustomPrice() which is actually what we set from admin