Preset checkout fields from /cart link

Highlighted
Shopify Partner
9 0 3

I'm trying to find out if it's possible to pass URL parameters in order to preset (at least) the Firstname and Lastname fields in the checkout page.

I'm currently able to direcly link a user to the checkout by forwarding to /cart/<product_name>:1?... including additional attributes. However since I've already collected the customer's name in a previous step I would like to preset this info (whether it's editable or not) in the checkout page they are presented with.

Thanks, Martijn

1 Like
Highlighted
Shopify Staff
Shopify Staff
189 0 20

Hello Martijn,

Keegan here from the Shopify Guru team.

Unsure of your use case, but it is possible to pass customer information from checkout out (through the order status page script box) by using the checkout objects below.

https://help.shopify.com/themes/liquid/objects/checkout

However passing things from cart to checkout, unsure. Can you provide a bit more clarification on use case? With that, I can try my best to get you an absolute answer with what is and is not possible on the current checkout. :)

Thanks for your post!

0 Likes
Highlighted
Shopify Partner
9 0 3

The use case is: We have a custom flow in which we use Shopify for a basic purchase experience of a quantity of 1 of a single product we offer.

The landing page (a custom liquid template) is a form that collects firstname, lastname, and insurance information. That combination of info is validated against an external source using Javascript. If all is ok, a "Next" button is set to an href of "/cart/<product_id>:1?attributes[xxx]=yyy&attributes[xx2]=yy2....

So that way, "Next" takes the user to the checkout flow with 1 quantity of our product already loaded in their cart. And also passing the insurance info as attributes.

However it would be nice if the user does not have to enter their firstname and lastname again under the shipping info on this screen.

Thanks

2 Likes
Highlighted
Shopify Partner
1 0 0

I could use a solid answer to this as well as we have a similar use case.

We already know the customer's name, shipping address and email as we're fielding phone calls from our CRM system (Salesforce).

I need to know how to go about pushing the customer information into Shopify so we can use it to pre-populate the customer information fields in checkout to streamline our telesales rep's checkout flow.

  1. Can we set cart attribute fields and access them from the checkout flow via Liquid?
  2. Is it possible to set the checkout email and address fields directly in the checkout Liquid?
  3. Could I set the address and email fields from the checkout object via the API?

What's the best method for pre-populating these fields?

 

0 Likes
Highlighted
New Member
1 0 0

Trying to figure out how to do this also. Let me know if you found a solution. 

0 Likes
Highlighted
Shopify Partner
1 0 0

You can now preload first_name, last_name, and bunch of other fields.

Checkout: https://help.shopify.com/en/themes/customization/cart/use-permalinks-to-preload-cart

 

Example:

/cart/{variant_id}:{quantity}?checkout[email]=somebody@store.com&[shipping_address][first_name]=john

`

0 Likes