Prefill checkout page with custom (hidden) data

Shopify Partner
38 0 0

Hi,

we are already able to prefill the customer data via a post get to the following checkout url:

https://dhlteststore.myshopify.com/checkout?checkout[email]=dhl-test1@ognaliv.com&checkout[shipping_...

This works pretty nicly for name, email, etc, but we can't figure out how I can set metafields with this request.

What is our intention?
-> We want to prefill the address for the customer (a pickup place) and also store the the ID of this pick up place in a metafiled (or any other hidden field)

Any ideas on how this could be done?

Cheers,
Gerwin

0 Likes
Shopify Staff
Shopify Staff
1102 77 144

Hey Gerwin, 

Currently, the checkout object doesn't have metafields if that's what you're trying to do. If anything, if you needed to store a pickup location somewhere, you may be able to do it on the order itself after it is placed since they do support metafields. You'd need to do that via the API though, as opposed to using a checkout URL.

0 Likes
Shopify Partner
38 0 0

Is there a good way to do that? Which is safe and not prone to any errors?
Since I can not add something to the order - except note_attributes which are editable by the shop owner.

How would I mark or identify an cart and then connect it to the order?

 

0 Likes
Highlighted
Shopify Partner
38 0 0

@Josh Wheeler - any update on this?

0 Likes
New Member
30 0 0

Hi Gerwin,

Any updates on this?

I'm very interested in getting pick up points available for my store. Please contact me.

Justin

E-Commerce Enthusiast
0 Likes