Please list the package(s) involved in the issue, and include the version you are using
@shopify/retail-ui-extensions-react v1.7.0
Describe the bug
Adding line item properties to different line items of the same product variant changes quantity
Steps to reproduce the behavior:
In admin create a buy 2 get 1 discount code - ensure the "Customer buys" and "Customer gets" are set to the same product.
In POS add 3 instances of the same product and apply the discount code. There should be 2 lines of the same product variant.
Add line item properties via bulkAddLineItemProperties - notice how the 2nd line is deleted.
Note that applying the same discount on 4 instances of the same product variant and bulkAddLineItemProperties updates the 1st line's quantity from 1 to 2.
Expected behavior
I'd expect the line item properties to change without affecting the quantity of items.
Please list the package(s) involved in the issue, and include the version you are using
@shopify/retail-ui-extensions-react v1.7.0
Describe the bug
Adding line item properties to different line items of the same product variant changes quantity
Steps to reproduce the behavior:
bulkAddLineItemProperties
- notice how the 2nd line is deleted.Note that applying the same discount on 4 instances of the same product variant and
bulkAddLineItemProperties
updates the 1st line's quantity from 1 to 2.Expected behavior
I'd expect the line item properties to change without affecting the quantity of items.
Screenshots
Additional context
Luckily, it looks like
addLineItemProperties
doesn't have this problem. Similar issue - https://github.com/Shopify/ui-extensions/issues/1989.