How to restrict online sales only in our city limits

We deal with organic food products, we started to use erpnext starting this April. We want to open up the erpnext online shop now. But we dont have capacities/resources to deliver out of our city limits or to other states. Pls let us know if can make online sales possible only for shipping addresses to a certain range of zip codes.

If so, how do we achieve this. Kindly help.


Good to know about your release.

For now, this option is not configurable.

Perhaps you can add a note in the footer or in the item listing about the product shipping limitations.

For now, do create a Github Issue for this suggestion.

Thanks @umair . Sure I will raise one github issue.
So what i was thinking was that, i will make address::pincode doc field a select type. And put only the allowed zip codes in the pick list. So that customers wont be able to enter any new values.
Same for state and district.
Not sure if that would work. Will check it out.

1 Like

Done @umair

1 Like

Unfortunately, the restrictions that we have put (using address doctype customization) for postal code, city, state are only in DESK view for system users.

In portal, when customers create addresses, there is no restriction.

Is there a way out. Any help.

You can create one doctype with list of city name or postal code wise and you can use custom script for validation for that.