Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum Order Amount breaks Cart if you delete Items #8781

Closed
juhanix opened this issue Mar 3, 2017 · 1 comment
Closed

Minimum Order Amount breaks Cart if you delete Items #8781

juhanix opened this issue Mar 3, 2017 · 1 comment

Comments

@juhanix
Copy link

juhanix commented Mar 3, 2017

Preconditions

  1. Magento 2.1.4 CE
  2. PHP 7.0.15
  3. nginx

Steps to reproduce

  1. Enable Stores/Configuration/Sales/Sales/Minimum Order Amount
  2. Set Minimum Amount to some number
  3. Add "Description Message" and "Error to Show in Shopping Cart"
  4. Clean and flush caches
  5. Go to Frontend
  6. Add some products so your total cart value is higher than the required minimum order amount
    7a. Go to /checkout/cart/ and empty the cart (/checkout/cart/delete/)
    7b. Go to /checkout/cart/ and update the amount of product so that total cart value will be under minimum order amount (/checkout/cart/updatePost/)
    7c. Update/delete items in cart via minicart
    7d. Update/delete items in cart via product page (/checkout/cart/updateItemOptions/id/759450/)

Expected result

  1. /checkout/cart should be reloaded and the "Error to Show in Shopping Cart" message should pop up

Actual result

  1. HTTP ERROR 500
  2. /var/log/nginx/error.log/
  • 2017/03/03 12:37:56 [error] 23927#23927: *67357 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Exception\InputException::__construct() must be an instance of Magento\Framework\Phrase, string given, called in /var/www/magento2/vendor/magento/module-quote/Model/ShippingAddressManagement.php on line 121 and defined in /var/www/magento2/vendor/magento/framework/Exception/InputException.php:51 Stack trace: #0 /var/www/magento2/vendor/magento/module-quote/Model/ShippingAddressManagement.php(121): Magento\Framework\Exception\InputException->__construct('My error Messag...') #1 /var/www/magento2/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingProcessor.php(66): Magento\Quote\Model\ShippingAddressManagement->assign('430809', Object(Magento\Quote\Model\Quote\Address)) #2 /var/www/magento2/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingAssignmentProcessor.php(76): Magento\Quote\Model\Quote\ShippingAssignment\ShippingProcessor->save(Object(Magento\Quote\Model" while reading response header from upstream, client: XX.XXX.XXX.XXX, server: www.somemagentoshop.com, request: "POST /checkout/cart/delete/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "www.somemagentoshop.com", referrer: "https://www.somemagentoshop.com/checkout/cart"

FYI

  1. Have empty cart
  2. add some products so you don't reach the minimum order amount
  3. go to /checkout/cart/
  4. It works: Expected message appears
  5. Delete Item(s): same error again
@YevSent
Copy link
Contributor

YevSent commented Mar 3, 2017

Hi, @juhanix, thanks for reporting. This is known issue and already fixed on develop branch.

Closing as the duplicate to #8287.

@YevSent YevSent closed this as completed Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants