Auto-select Location based on selected location on Online Store

Solved

Auto-select Location based on selected location on Online Store

Kenyon_Kowal
Shopify Partner
12 2 12

Hello,

 

We need for a user on our site to select a location before checking out. Once the user selects the location, during checkout we want to have that pickup location selected by default.

 

For example, there are two locations: Asheville and Charlotte.
- A user select Charlotte and checkouts out.
- Preselect Charlotte as the pickup location. (Currently it's picking Asheville because it's the first in the list.)

 

My question is, is this possible with the Checkout UI Extensions or Shopify Functions API or is this something that requires a custom checkout?

 

Any help would be appreciated!

Thanks!

Accepted Solution (1)

lizk
Shopify Staff
246 58 74

This is an accepted solution.

Hi there 👋

I believe this is something that could be accomplished with Delivery Customization Shopify Functions.

I would recommend reviewing the tutorial on building a delivery customization.

You could save the pre-selected location as a cart attribute. You would then use that input in your function to move the selected location to the top of the list.

Hope this helps!

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 2 (2)

lizk
Shopify Staff
246 58 74

This is an accepted solution.

Hi there 👋

I believe this is something that could be accomplished with Delivery Customization Shopify Functions.

I would recommend reviewing the tutorial on building a delivery customization.

You could save the pre-selected location as a cart attribute. You would then use that input in your function to move the selected location to the top of the list.

Hope this helps!

To learn more visit the Shopify Help Center or the Community Blog.

Kenyon_Kowal
Shopify Partner
12 2 12

Amazing, thank you for the resources. I missed those API docs!