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

[Backport] Fix empty cart validation #21528

Merged
merged 3 commits into from
Mar 14, 2019
Merged

[Backport] Fix empty cart validation #21528

merged 3 commits into from
Mar 14, 2019

Conversation

wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Mar 1, 2019

Original Pull Request

#21295

Description

This PR prevents from running UpdateItemQty validation before Clear Shopping Cart action is triggered. In the other case validation breaks for use case in which product existing in cart went out of stock in the meantime.

Fixed Issues

  1. Cart can't be emptied if any product is out of stock #21294

Manual testing scenarios

  1. Add simple product in backend, set positive quantity and Stock Status = In Stock
  2. Open another browser tab and access product in frontend
  3. Add product to cart
  4. Navigate to cart
  5. Enable "Clear Shopping Cart" button by running this code in console:
    jQuery('.action.clear').show()
    It's hidden in CSS for some reason.
  6. Back to product form in the backend
  7. Set Stock Status for product to Out of Stock, save
  8. Click "Clear Shopping Cart" button in the cart in frontend

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@wojtekn
Copy link
Contributor Author

wojtekn commented Mar 1, 2019

@magento-engcom-team give me 2.2-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn. Thank you for your request. I'm working on Magento 2.2-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn, here is your Magento instance.
Admin access: https://i-21528-2-2-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@wojtekn
Copy link
Contributor Author

wojtekn commented Mar 1, 2019

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn, here is your new Magento instance.
Admin access: https://pr-21528.instances.magento-community.engineering/admin
Login: admin Password: 123123q

@wojtekn
Copy link
Contributor Author

wojtekn commented Mar 1, 2019

I reproduced the issue on the vanilla instance and then confirmed that PR fixes it on the instance based on the PR.

@magento-engcom-team
Copy link
Contributor

Hi @sivaschenko, thank you for the review.
ENGCOM-4479 has been created to process this Pull Request

@soleksii
Copy link

✔️ QA Passed

@ghost
Copy link

ghost commented Mar 14, 2019

Hi @wojtekn, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team merged commit 42b03bb into magento:2.2-develop Mar 14, 2019
@magento-engcom-team magento-engcom-team added this to the Release: 2.2.9 milestone Mar 14, 2019
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.

6 participants