If you allow a country and then select an order and choose a state, then the state will prevail. In my case, because I only need per country restriction, this is a problem.

So I unchecked:

// Explanations of Failure if Raised
//Simple Global Failures
  if (count($fail) != 0) {
    foreach ($fail as $reason) {
    switch ($reason) {
        case 'country':
        form_set_error('', t('We are sorry to inform you that we do not ship selected item(s) to your contry: @country. Therefore, we cannot proceed further. Please read our shipping policies and review your order.',
          array('@country' => $country->country_name )));
      break;
//      case 'zone':
//        form_set_error('', t('We are sorry to inform you that we do not ship selected item(s) to your state/province: @zone. Therefore, we cannot proceed further. Please read our shipping policies and review your order.',
//          array('@zone' => $zone->zone_name )));
//      break;
      }
    }
  }

It seems more interesting to select a country as a whole OR to select states inside a country. But not both. An make countries prevail on states.

Comments

grub3’s picture

Unsetting this still does not work.
It seems that products that have no restriction still generate restrictions when zone is set.
I am stuck ...