Adding a metafield to the buy button

Hello!

Have been working on a shopify app to integrate to an online store we are building. API is super well documented and all working perfectly thus far.

Question: I would like to add a metafield to the buy button. Our web app allows users to create a custom design which we would like to attach to an order of a “generic” product in our store. Customer creates their custom design, and upon clicking the “Buy Button” I’d like to add a metafield with information pertaining to their custom design (saved and databsed by us independently).

The customizations are not available to anyone but their creator, so creating a new product does not make sense. I cannot find a way to attach a metafield to the Buy Button - is there information regarding this?

Thanks in advance for any pointers!

Joe

Joe,

Did you figure how to do this?

I have the same exact problem, I am using the buy button only, in my case I don’t have a store.

The buy button code works perfectly out of the box, but I now need to add custom fields to it and have it available when I export the orders.

Anyway, I am start working on this.

Will update here in case I figure something out.

Thanks,

Helio

You used to be able to POST variant ids and any metafields you wanted to the cart directly. It worked really well until they changed to https. I’m currently trying to discover a workaround. The SDK is of no use because it does not use the real shopping cart.