0

I have multiple catalog price rules on same product with same price but different priority, so i suppose that system will apply the lowest (0 is lowest) priority rule to calculate final price.

Rule A:

status: active, Priority:0, action: to fixed amount, Discount: 223.200, Stop further rule: Yes

Rule B:

status: active, Priority:1, action: to fixed amount, Discount: 223.200, Stop further rule: yes

So I suppose final price has to be 223.200 by using Rule A. But Final price is coming 223.00.

I have no idea whats happening, can anyone has idea what possibly could be reason of this.

2
  • your magento version is 1.9.2.4 or lower ?? Feb 13, 2017 at 5:34
  • magento 1.9.3.1
    – sohaib
    Feb 13, 2017 at 22:56

1 Answer 1

0

app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php, in method _calculatePrice() around line 440:

$byFixed   => $this->_connection->getCheckSql(
                        new Zend_Db_Expr('0 > @price - cppt.action_amount'),
                        new Zend_Db_Expr('0'),
                        new Zend_Db_Expr('@price - cppt.action_amount')
                    ),
                )
            )
        ),
        '@price := @price' // <-- the culprit
    );
} 

replace with:

     $byFixed   => $this->_connection->getCheckSql(
                        new Zend_Db_Expr('0 > @price - cppt.action_amount'),
                        new Zend_Db_Expr('0'),
                        new Zend_Db_Expr('@price - cppt.action_amount')
                    ),
                )
            )
        ),
        '@price' // remove ':= @price' to fix rounding bug
    );
} 

Source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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