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.

  • your magento version is 1.9.2.4 or lower ?? – Gopal Patel Feb 13 '17 at 5:34
  • magento 1.9.3.1 – sohaib Feb 13 '17 at 22:56
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, privacy policy and cookie policy

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