Created
January 28, 2020 15:32
-
-
Save shopifypartners/fc716189f28349d9fb4cfe27aeb3fb0d to your computer and use it in GitHub Desktop.
Adding POS cart items (with App Bridge)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can i add the same variant id with different properties in POS? same like in the online store!