Shopify / dawn

Shopify's first source available reference theme, with Online Store 2.0 features and performance built-in.
Other
2.51k stars 3.38k forks source link

Update Cart Qty Filter for variant #2786

Open sofiamatulis opened 1 year ago

sofiamatulis commented 1 year ago

Describe the current behavior

We are currently using cart | item_count_for_variant: product.selected_or_first_available_variant.id, which is being deprecated.

Describe the expected behavior

We should now use: {{ cart | line_items_for: product.variant | sum: 'quantity' }}

Liquid files to update:

kimberlyoleiro commented 1 year ago

Thanks for logging. Do you have more context about why this change is happening? What is the before/after we're expecting? How do we test? Etc

sofiamatulis commented 1 year ago

@kimberlyoleiro Yes! well need to re-test the cart qty/awareness feature :) https://github.com/Shopify/dawn/pull/2203

Make sure this works in PDP/feat prod: https://screenshot.click/07-10-k0mka-moq50.png

sofiamatulis commented 1 year ago

More context: https://github.com/Shopify/dawn-private/issues/223