I have made an module which adds the discount and extra fee charges in the orders, invoice, print totals without overriding collect() and fetch(), I have used observer to calculate at sales_quote_collect_totals_after, but I am not able to figure out from where to make this free charges appears in the calculations of orders, invoice, print totals in front end.


Here is example of adding custom fee in order totals:



For frontend order total:


class Spacename_Modulename_Block_Sales_Order_Totals extends Mage_Sales_Block_Order_Totals
     * Initialize order totals array
     * @return Mage_Sales_Block_Order_Totals
    protected function _initTotals()
        $order_id = $this->getOrder()->getId();

        $amount = 5.00;
        if ($amount) {
            $this->addTotalBefore(new Varien_Object(array(
                'code' => 'mobielfee',
                'value' => $amount,
                'base_value' => $amount,
                'label' => $this->helper('servicecenters')->__('Shipping / Mobile installation Fee'),
            ), array('shipping', 'tax')));

        return $this;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.