1
votes

On Magento shop system, We have a campaign running now offering 50€ discount on orders above 100€. The coupon does not work on orders between 100€ and 125€ because the shop’s minimum order value is 75€. The coupon rule checks the subtotal of the cart after the discount has been applied.

1

1 Answers

3
votes

The logic of minimum order amount is implemented in the model "Sales/Quote". You may find the function validateMinimumAmount in the Mage/Sales/Model/Quote.php

If your website doesn't support multiple address shipping, you may only need to look into the function validateMinimumAmount in the Mage/Sales/Model/Quote/Address.php

For example, for Magento 1.7.0.2, it will locate at line. 1025. I think change the snippet

if ($this->getBaseSubtotalWithDiscount() < $amount) {

to

if ($this->getBaseSubtotal() < $amount) {

.

However, it's highly recommended not to modify the core code directly. That's to say, you may need to create a module to rewrite the model.

BTW, all the code above is not tested.

Hope that helps.