Update query selectors to fix selection issue #3730
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary:
Fixes bulk quick order component bug where invalid ID prevented cart subscription handler from working
Why are these changes introduced?
This PR from last April tweaked which html element cached the section.id in a data attribute, but missed some query selectors in the corresponding JS.
The impact of this is that if there are multiple quick order bulk widgets present on a collection page, the component isn't able to read the section ID from the dom and (ultimately) a network call 404s. Demo video.
Credit to @stanley-xu for finding this issue.
What approach did you take?
Updated the selector to point to the correct location in the DOM.
Demo links
https://6483d52vk55uzev9-58156712071.shopifypreview.com
choose options
and increase a quantity in the quick order listChecklist