Skip to content

Commit

Permalink
Fix: various problems with minimum order amount enabled
Browse files Browse the repository at this point in the history
See magento#6151 for the basics.

When minimum order amount is enabled:
1. add 1 product to the cart; total is below min order amount -> no error.
2. Try to remove that product -> error about minimum amount.
3. Try to add more to the cart with total still below min order -> error about minimum amount
4. Add a product that will bring the total cart amount **over** the min order amount and no errors!

I will request the Magento team takes a look at this line. I don't understand why the minimum amount is being validated here but perhaps it has something to do with multi-shipping checkouts. However, it botches the min order amount logic badly in it's current form.
  • Loading branch information
ericrisler authored Feb 18, 2017
1 parent 49aef35 commit d45794e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/code/Magento/Quote/Model/ShippingAddressManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,13 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
$address->setSaveInAddressBook($saveInAddressBook);
$address->setCollectShippingRates(true);


/*
// Fix for https://github.com/magento/magento2/issues/6151
if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) {
throw new InputException(__($this->getMinimumAmountErrorMessage()->getMessage()));
}
*/

try {
$address->save();
Expand Down

0 comments on commit d45794e

Please sign in to comment.