If you just want to have the local checkout occur only under certain conditions then you will first need to define exactly what those conditions are and how the process should work when the conditions are met and when they are not.
The best way to do this would be to try and describe just how this should work from the perspective of the user that will be going through the process. An example of each scenario would be best. If you can detail how you would like this to work from the perspective of the user we can give you some more specific advice on how to implement this.