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;
    }

1 comment:

Magento Shopping Cart New York said...

This post is really nice and informative. The explanation given is really comprehensive and informative.