Closed jonmol closed 1 year ago
What seems to work is creating a plain old href link and have it point to checkout like this
https://your-shop.myshopify.com/cart/your-product-id:amount?channel=buy_button&attributes[userID]=the-user-id
I must say, I don't really get the point of the buy-button when you just want a button on another site and it's just to use a direct URL instead. But it seems like the problem is solved anyway.
Our end goal is a flow like this: On a web page where the user has to be logged in we will have a "Buy now" button. This button will take the user directly to checkout. When a user makes the buy, we will subscribe to the web hook and mark that the user bought something.
For this flow we need the userID to pass through, and notes_attributes in the webhook seems to be the field to use. When looking at the buy-button I can't find where I'd put the attribute_notes though. Can someone please point me in the right direction?
I had a look at #436 but I'm not sure that really helps.
The button code I have is the one generated from the store page, looking like: