Wednesday 17 April 2013

How to use negative discount amount in magento

Step 1: Go to there and comment the line:


app/code/core/Mage/Rule/Model-------->Abstract.php


if ((int)$this->getDiscountAmount() < 0) {
Mage::throwException(Mage::helper(‘rule’)->__(‘Invalid discount amount.’));
}



Step 2: Go here and commented the below line:

app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab------->Actions.php


‘class’ => ‘validate-not-negative-number’,

3 comments:

  1. its working only for shipping cart price rule

    ReplyDelete
    Replies
    1. It can be done via going to this path and edit app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/action.php

      comment this line:
      'class' => 'validate-not-negative-number',

      Delete