Skip to content

Instantly share code, notes, and snippets.

@shopifypartners
Created January 28, 2020 15:32
Show Gist options
  • Save shopifypartners/fc716189f28349d9fb4cfe27aeb3fb0d to your computer and use it in GitHub Desktop.
Save shopifypartners/fc716189f28349d9fb4cfe27aeb3fb0d to your computer and use it in GitHub Desktop.
Adding POS cart items (with App Bridge)
var unsubscriber = cart.subscribe(Cart.Action.UPDATE, function (payload: Cart.Payload) {
console.log('[Client] setLineItemProperties', payload);
unsubscriber();
});
cart.dispatch(Cart.Action.SET_LINE_ITEM_PROPERTIES, {
index: 0,
data: {
referral: 'Shopify',
userID: '1234',
}
});
@virendra-cirkle
Copy link

Can i add the same variant id with different properties in POS? same like in the online store!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment