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

Fix for https://github.com/magento/magento2/issues/8287 #8474

Merged
merged 1 commit into from
Feb 11, 2017

Conversation

ericrisler
Copy link
Contributor

@ericrisler ericrisler commented Feb 8, 2017

Added missing __() wrap on execption. Without it a new exception is thrown: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Exception\InputException::__construct() must be an instance of Magento\Framework\Phrase, string given

Fix for #8287

Added missing __() wrap on execption. Without it a new exception is thrown: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Magento\Framework\Exception\InputException::__construct() must be an instance of Magento\Framework\Phrase, string given
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Feb 8, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@okorshenko okorshenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericrisler thank you for your contribution. Your PR fixes the issue but I'd recommend alternative solution.

The issue itself goes from https://github.com/magento/magento2/blob/develop/app/code/Magento/Quote/Model/Quote/Validator/MinimumOrderAmount/ValidationMessage.php#L46

If error message is configured the method returns it as is. I would recommend return Phrase object from the method \Magento\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage::getMessage() in all cases. In this way, we don't need to wrap method result second time. Plus, the method itself will have strict return type which is better from code design perspective.

СС: @sidolov

@okorshenko okorshenko added this to the February 2017 milestone Feb 11, 2017
@mmansoor-magento mmansoor-magento merged commit 49aef35 into magento:develop Feb 11, 2017
@okorshenko
Copy link
Contributor

@ericrisler thank you for your contribution. We merged your PR with some adjustments

@warperharper
Copy link

This doesn't resolve the issue for me. Add one item to cart OK. Second item fails if value is below minimum amount. If value over minimum amount is added to cart, you can add more items, but you cannot delete items if removing them brings the value below minimum. 2.1.6

@mzenner1
Copy link

I'm having the same issue as @warperharper. I can add one item just fine. After that, I can't add anything else to my cart or even remove the existing item. My minimum order amount is $60. I added something to my cart that was $2.50. Magento 2.1.6.

Please fix this guys. My client needs the minimum order amount

@ifeltsweet
Copy link

Still broken on 2.1.6. The change doesn't seem to be merged into the code.

@ifeltsweet
Copy link

Still broken in 2.1.8... O_O

@okorshenko
Copy link
Contributor

Fix will be available in 2.2

@Ctucker9233
Copy link

@okorshenko Any plans to backport seeing as how this was an issue with 2.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants