Liquid, Javascript
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!
First of all, do you have access to Shopify checkout 2.0?
If so, you could create a new module where you limit it to show only the towns or cities you want to display. This would be accomplished with react.
¿Alguna vez has creado una colección y has tenido problemas para añadir tus productos a...
By Ann Sep 10, 2024Una de las cosas que más presión genera a la hora de emprender con un negocio es conver...
By Teo Aug 20, 2024¿Alguna vez has visitado una página web lenta con imágenes pixeladas? ¿Qué haces cuando...
By Ann Aug 13, 2024