FROM CACHE - es_header
Esta comunidad ahora recibe asistencia de una red de pares. El equipo de atención al cliente de Shopify ya no ofrece servicio a esta comunidad. Te animamos a conectar con otros emprendedores y partners para pedir ayuda y compartir tus experiencias. Sigue avisando de asuntos que incumplan nuestro Código de Conducta o contenidos que se deberían eliminar.

Issue with validating specific cities during Shopify checkout

Issue with validating specific cities during Shopify checkout

HerlonAmancio
Visitante
1 0 0

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!

1 RESPUESTA 1

ColombiaDev
Shopify Partner
139 10 16

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.

hulpify.com | Shopify Partners | Front-end Developer | Shopify | Liquid | Ruby | Javascript | API Rest | SEO | Optimización.