Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Minimum amount check against Subtotal? 
 
comdc
Jr. Member
 
Total Posts:  11
Joined:  2008-09-19
 

Hi,

I was wondering why Magento checks the minimum amount for checkout against the subtotal and not against the grand total. I found it very confusing to have products for, say $26 in the cart but with a minimum amount of $25 and the taxes I wasn’t able to checkout, because the subtotal was lower than $25.

I solved this here on my installation by modifying the code in app/code/core/Mage/Sales/Model/Quote/Address.php like this:

609     public function validateMinimumAmount()
610     {
611         
if ($this->getAddressType()!=self::TYPE_SHIPPING{
612             
return true;
613         }
614         $storeId 
$this->getQuote()->getStoreId();
615         if (!Mage::getStoreConfigFlag('sales/minimum_order/active'$storeId)) {
616             
return true;
617         }
618         $amount 
Mage::getStoreConfig('sales/minimum_order/amount'$storeId);
619         # Check minimum amount not against subtotal but against grand total
620         # if ($this->getBaseSubtotalWithDiscount()<$amount) {
621         if ($this->getGrandTotal()<$amount{
622
623             
return false;
624         }
625         
return true;
626     }

I’d suppose to at least give an option in the Backend to define if the minimum amount is checked against the subtotal or the grand total.

Greetings
comdc

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

YOU HAVE JUST SAVED MY F*ING LIFE!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
IC360
Jr. Member
 
Total Posts:  4
Joined:  2008-10-16
Swindon, UK
 

Me too.
Nice one.
grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
alageweg
Jr. Member
 
Total Posts:  4
Joined:  2011-06-01
 

This did the trick for us.
We have the same problem for the minimum order amount for the free shipping method. If the orderamount inc Tax/Vat is higher then € 20,00 there must be no shipping costs. I can’t find the solution for this.Does anyone know how this can be achieved?
The minimum order amount is calculated over the subtotal.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Soraph
Jr. Member
 
Total Posts:  11
Joined:  2011-06-02
 
alageweg - 09 November 2011 05:56 AM

This did the trick for us.
We have the same problem for the minimum order amount for the free shipping method. If the orderamount inc Tax/Vat is higher then € 20,00 there must be no shipping costs. I can’t find the solution for this.Does anyone know how this can be achieved?
The minimum order amount is calculated over the subtotal.

I believe you can have 2 solutions:
1. Create a shopping cart rule that apply a discount for the amount of the shipping cost when the cart price is what you want.
2. Handle the shipping method as Price vs Destination and use the table rates with a line in the CSV telling the system to not apply shipping costs when there is a specific price.

 
Magento Community Magento Community
Magento Community
Magento Community
 
joangus
Jr. Member
 
Total Posts:  20
Joined:  2012-11-26
 

Is it still valid for 1.7 (June 2013) ???

Thankyou
Joan

comdc - 22 September 2008 10:07 AM

Hi,

I was wondering why Magento checks the minimum amount for checkout against the subtotal and not against the grand total. I found it very confusing to have products for, say $26 in the cart but with a minimum amount of $25 and the taxes I wasn’t able to checkout, because the subtotal was lower than $25.

I solved this here on my installation by modifying the code in app/code/core/Mage/Sales/Model/Quote/Address.php like this:

609     public function validateMinimumAmount()
610     {
611         
if ($this->getAddressType()!=self::TYPE_SHIPPING{
612             
return true;
613         }
614         $storeId 
$this->getQuote()->getStoreId();
615         if (!Mage::getStoreConfigFlag('sales/minimum_order/active'$storeId)) {
616             
return true;
617         }
618         $amount 
Mage::getStoreConfig('sales/minimum_order/amount'$storeId);
619         # Check minimum amount not against subtotal but against grand total
620         # if ($this->getBaseSubtotalWithDiscount()<$amount) {
621         if ($this->getGrandTotal()<$amount{
622
623             
return false;
624         }
625         
return true;
626     }

I’d suppose to at least give an option in the Backend to define if the minimum amount is checked against the subtotal or the grand total.

Greetings
comdc
 
Magento Community Magento Community
Magento Community
Magento Community
 
elenistore
Jr. Member
 
Total Posts:  5
Joined:  2012-12-20
 

Works on 1.7

Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top