Hi Shopify Community,
I’m currently developing a Shopify store called “La Veguita del Alto,” where we offer deliveries only to specific areas in Santiago, Chile: Vitacura, Lo Barnechea, and Huechuraba. My goal is to restrict deliveries to these areas and display a clear message when a customer selects a city outside of this list.
I’ve implemented a custom script (comunas.js) to validate allowed cities and show an alert when the customer chooses an unavailable city: “City not available for delivery at the moment.” However, I’m having trouble making this validation work correctly in all cases, especially when a customer selects an invalid city from the start or edits a previously entered address.
Has anyone had experience with validating cities or regions in Shopify? Any suggestions or solutions on how to better enforce these kinds of restrictions during checkout would be greatly appreciated.
Thanks in advance for your help!