If postie plugin can't add zone support, then you will need to limit the selections options on the front end and need the zones available in twig.
Postie implementing it would be the first preferance, as there would be no backend validation if you just hid the options in twig.
There currently is no craft.commmerce.shippingZones
twig variable. You would need to expose it with a plugin.
Creating a plugin at the http://pluginfactory.io with a variable class.
To the variable class within the plugin add:
public function getAllShippingZones()
{
return craft()->commerce_shippingZones->getAllShippingZones();
}
public function matchZoneAndAddress($zone, Commerce_AddressModel $address)
{
if ($zone->countryBased)
{
$countryIds = $zone->getCountryIds();
if (in_array($address->countryId, $countryIds))
{
return true;
}
}
else
{
$states = [];
$countries = [];
$stateAbbrs = [];
$stateNames = [];
foreach ($zone->states as $state)
{
$states[] = $state->id;
$stateNames[] = $state->name;
$stateAbbrs[] = $state->abbreviation;
$countries[] = $state->countryId;
}
if ($countries){
array_filter($countries);
}
if ($stateNames){
array_filter($stateNames);
}
if ($stateAbbrs){
array_filter($stateAbbrs);
}
$countryAndStateMatch = (in_array($address->countryId, $countries) && in_array($address->stateId, $states));
$countryAndStateNameMatch = (in_array($address->countryId, $countries) && $this->_inArrayCaseinsensitive($address->getStateText(), $stateNames));
$countryAndStateAbbrMatch = (in_array($address->countryId, $countries) && $this->_inArrayCaseinsensitive($address->getStateAbbreviation(), $stateAbbrs));
if ($countryAndStateMatch || $countryAndStateNameMatch || $countryAndStateAbbrMatch)
{
return true;
}
}
return false;
}
/**
* @param $needle
* @param $haystack
* @return bool
*/
private function _inArrayCaseinsensitive($needle, $haystack) {
return in_array(strtolower($needle), array_map('strtolower', $haystack), false);
}
This would allow you to do:
{% set doesMatch = craft.yourPlugin.matchZoneAndAddress(zone, cart.shippingAddress) %}
To determine if an address is within a zone.
Hope that helps.