Shopify / ui-extensions

MIT License
249 stars 35 forks source link

POS UI extensions - different line items with duplicate UUIDs #1989

Open galmis opened 1 month ago

galmis commented 1 month ago

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

Different line items of the same product variant contain the same UUID making it impossible to update one without affecting the other(s). For example, addLineItemProperties adds the same properties to different line items.

Steps to reproduce the behavior:

  1. In admin create a Buy X get Y discount code - ensure the "Customer buys" and "Customer gets" are set to the same product.
  2. In POS add the necessary quantity of the same product, e.g. 3 products (for buy 2 get 1 discount). All products should be within the same line item.
  3. Apply the discount code, which splits the line item into multiple. However, all different line items contain the same UUID.

Expected behavior

I'd expect the line items to have different UUIDs just like different order line items of the same product variant have different IDs.

Screenshots

Additional context

The issue is related to https://github.com/Shopify/ui-extensions/issues/1536 and https://github.com/Shopify/ui-extensions/issues/1536. However, here the line items are already split.