Showing posts with label How to change discount label magento. Show all posts
Showing posts with label How to change discount label magento. Show all posts

Friday, 28 August 2015

Change discount label shopping cart magento


Change discount label shopping cart magento

Open app\code\core\Mage\SalesRule\Model\Quote\Discount.php and find the below function and change the label where i have changed.

 public function fetch(Mage_Sales_Model_Quote_Address $address)
    {
        $amount = $address->getDiscountAmount();

        if ($amount != 0) {
            $description = $address->getDiscountDescription();
            if (strlen($description)) {
                $title = Mage::helper('sales')->__('Total Discount (%s)', $description);
            } else {
                $title = Mage::helper('sales')->__('Total Discount');
            }
            $address->addTotal(array(
                'code'  => $this->getCode(),
                'title' => $title,
                'value' => $amount
            ));
        }
        return $this;
    }