James
James

Reputation: 3273

Magento - Change Minimum order amount to Maximum Order Amount

I'm trying to change the minimum order amount functionality found in System > Configuration > Sales > Sales > Minimum Order Amount to a 'Maximum Order Amount'

I'm hoping it will be as simple as changing a '>' to a '<' in the function but can't find the correct file.

[The purpose is that shipping to a particular country (which has it's own website) has to be below a certain dollar value otherwise customs duty, gst and other tariffs are paid. So I am trying to implement a maximum order value to keep all orders to this destination under that tier so that the customers don't have to pay unexpected fees]

Upvotes: 1

Views: 2257

Answers (1)

James
James

Reputation: 3273

I found the solution.

It's hidden away in App > Code > Core > Mage > Sales > Model > Quote > Address.php

Line 895

$amount = Mage::getStoreConfig('sales/minimum_order/amount', $storeId);
if ($this->getBaseSubtotalWithDiscount() < $amount) {
    return false
}

Simply change < to >

And then in App > Code > Core > Mage > Sales > etc > system.xml around lines 157 - 226 change all of the labels from 'Minimum Amount' to 'Maximum Amount' so on the back end it displays correctly in the menus.

Upvotes: 2

Related Questions