Predefined static city in shipment info form

Solved
theYaro
New Member
3 0 0

Hello

Is there is any way to put predefined city on «Shipping address» form? So other address suggestions were based on this city location.

We need this because we are building multivendor store flower bouquets with local free delivery form every vendor in their respective cities.

Thanks.

0 Likes
gina-gregory
Shopify Expert
647 37 141

This is an accepted solution.

You can pre-fill the shipping city by appending a URL parameter to your checkout link. Like this:

/checkout?checkout[shipping_address][city]=Name of City

You can also pre-fill the other shipping address fields: https://community.shopify.com/c/Shopify-Design/Cart-Use-permalinks-to-pre-load-the-cart/td-p/613702#...

This doesn't prevent the customer from changing the address though.

If you're on a Shopify Plus store, you could use javascript to try to keep them from altering it.

theYaro
New Member
3 0 0

Thank you, Gina.

Btw,  there is one more additional solution to prevent using forbidden city for shipping by using Bespoke Shipping app https://apps.shopify.com/custom-shipping-rates and its php enabled macro editor. We can program logic inside of it and check for target shipping city and don't return shipping rates if it is prohibited to deliver.

0 Likes