Skip to content

Update multiple bulk quick add modals for parity throughout multiple sections#3619

Closed
cfxd wants to merge 1 commit intoShopify:mainfrom
cfxd:update-multiple-quick-add-modals
Closed

Update multiple bulk quick add modals for parity throughout multiple sections#3619
cfxd wants to merge 1 commit intoShopify:mainfrom
cfxd:update-multiple-quick-add-modals

Conversation

@cfxd
Copy link
Contributor

@cfxd cfxd commented Sep 23, 2024

PR Summary:

Fixes multiple bulk quick add modals on the same page not updating properly

Why are these changes introduced?

Problem demo @

multi-quick-add-modal.mp4

When multiple sections each contain the same product, only the first quick add modal updates because the current script relies heavily on element IDs

What approach did you take?

Introduced a way to update multiple elements

Testing steps/scenarios

  • Create a new manual collection and add only one variant product
  • Customize the collection template by setting the Product grid section "Quick add" option to "Bulk"
  • Add a new Featured collection section to the collection template and select the newly created manual collection as this new section's collection, also set the new section's "Quick add" option to "Bulk"
  • (Optional) duplicate the new Featured collection section as many times as you like
  • Add/remove products as desired to the various bulk quick add modals and you'll notice that only the first one on the page is updated accurately because of the update script's reliance on element IDs

Demo links

  • Store password: infinite

Checklist

@cfxd cfxd force-pushed the update-multiple-quick-add-modals branch 4 times, most recently from 8b18d24 to c623d27 Compare September 23, 2024 14:37
Refresh quick order list elements after rendering

Simplify the refresh

Better variable naming

Better refresh after render

Clean up variant selector
@cfxd cfxd force-pushed the update-multiple-quick-add-modals branch from c623d27 to fc82fde Compare September 25, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants