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: return a unique id in the line item list's trackBy function #1390

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

SGrueber
Copy link
Collaborator

@SGrueber SGrueber commented Mar 20, 2023

PR Type

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

For rendering the line item list a trackBy function is used for performance reasons that returns the sku, but the sku is not always a unique identifier for the list items.
E.g. cart items might have the same sku if the ICM backoffice setting 'Add product behavior' (application shopping cart & checkout preference) is set to 'Allow repeats'. The default preference 'Merge quantities' is also not always applicable, e.g. if the product contains a warranty.

The equivocal trackBy return value might cause rendering problems on the line item list.

Issue Number: Closes #

What Is the New Behavior?

The trackby function returns the id as a unique value for a list item.

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

AB#84665

@SGrueber SGrueber added the bug Something isn't working label Mar 20, 2023
@SGrueber SGrueber added this to the 4.0 milestone Mar 20, 2023
@SGrueber SGrueber requested a review from Eisie96 March 20, 2023 15:15
@SGrueber SGrueber self-assigned this Mar 20, 2023
@SGrueber SGrueber merged commit 78d99d0 into develop Mar 21, 2023
@SGrueber SGrueber deleted the bugfix/trackBy_on_line_item_list branch March 21, 2023 08:03
SGrueber added a commit that referenced this pull request Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants