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

Fixes duplicate messages shown when adding items to cart #7615

Merged
merged 1 commit into from
Mar 16, 2017
Merged

Fixes duplicate messages shown when adding items to cart #7615

merged 1 commit into from
Mar 16, 2017

Conversation

comdiler
Copy link

@comdiler comdiler commented Nov 29, 2016

The duplicate error messages can be shown when adding products to cart.
This fix changes the filtering logic to make only unique messages shown.

Error use case preconditions:

  1. Configurable product
  2. Adding configurable to cart
  3. Two errors occurred
  4. "Error message 1" added to configurable product
  5. "Error message 1" added to simple product
  6. "Error message 2" added to simple product only (let's imagine such validator that validates simples)

Result:
$item->getMessage() for configurable product will return "Error message 1"
$item->getMessage() for configurable product will return "Error message 1\nError message 2"
"Error message 1" will be shown two times, because of "not perfect" unique errors filtering.

@vrann vrann self-assigned this Mar 15, 2017
@vrann vrann added this to the March 2017 milestone Mar 15, 2017
@magento-team magento-team merged commit c5699b9 into magento:develop Mar 16, 2017
@okorshenko
Copy link
Contributor

@comdiler thank you for your contribution

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