Setting default address for customer on checkout form

kyle_d
New Member
4 0 0

The home page of my website has a search bar where users need to enter their address and they will see collections based off the address entered, I then store this value in a javascript variable. Users can then purchase items from the select collections, I need to make sure that they cannot change their address when they are at checkout, therefore I would like to automatically set their address to the one that is stored in the variable. How can I automatically set a users address in the checkout form?

 

Thanks

0 Likes
Ignitor2501
Excursionist
21 0 5

Hi Kyle,
You can prefill the customer info by using permalinks.Here is the documentation for the same https://help.shopify.com/en/themes/customization/cart/use-permalinks-to-preload-cart . But user can still be able to change that when they switch back to customer info page and to restrict that you'll have to write some custom javsscript on checkout page which is only available for plus plans as of now.
Thanks.

0 Likes
saucierb
New Member
1 0 0

Any reason why this feature wouldn't work anymore? We re-enabled a feature making use of checkout permalinks after disabling it when the pandemy hits and it seems like it's not working anymore. We used to be able to set the shipping address with the URL parameters but now it seems like the customer default address won't be overridden by the parameters in the URL.

0 Likes