POS UI Extensions: Allow same variant with different properties added as separate line items #1021
Description
Please list the related package(s)
retail-ui-extensions v1.1.2
If this related to specific APIs or components, please list them here
addLineItem from the Cart API
Is your feature request related to a problem? Please describe.
It is currently impossible to have the same variant, with different lineItem properties, in different lines of the cart.
Currently, when adding a lineItem to the cart in POS, the api allows us to specify the variant and quantity we want to add. It however does not allow us to specify line item properties with that payload. Instead, we need to add line item properties based on the line item uuid after the fact. This creates an issue where you cannot add the same variant with different line item properties.
This is inconsistent with the Online Store and prevents the implementation of solutions to meet different requirements for clients. For example:
- You sell custom rings with engraving, and your customer wants to buy three rings for his daughters Jill, Kelly and Laura.
- You sell food and the same variant can have different discounts based on the date of expiry.
- You sell bundles and you want to add the same variant in different bundles. (We use a bundleId lineItem property to tie bundles together in Online Stores, for example here)
... and I am use that there is a lot more use cases.
This is an issue in App Bridge with has been reported years ago Shopify/shopify-app-bridge#28
Describe the changes you are looking for
- Add a parameter to the addLineItem method to add line-item properties when adding the lineItem to the POS cart.
- Separate lineItems with the same variantId but different lineItem properties in the POS cart, pairing the behaviour with the online store
Describe alternatives you’ve considered
There are really no effective alternatives to this issue. Workarounds can be found for some possible use cases but there are others where there is no possible alternative.