How to configure a Shipping Restriction based on postcodes?
There are several ways to configure a Shipping Restriction that will block a certain delivery method based on postcodes.
If you are using multiple single postcodes or ranges, one of the methods to configure a postcode-based Shipping Restriction is to use the Shipping Area component to list all of the postcodes.
Shipping Area is a sub-extension that is provided with the Shipping Restrictions module. It helps include or exclude multiple countries, states, postcodes, etc.
Step 1. To list some specific postcodes, please go to Magento Admin Panel → Sales → Shipping Areas, click the Add Shipping Area button, fill in the name of the Area, select the country, and the Include/Exclude action for your postcodes. To configure a postcode range, please fill in the first and the last postcode of it:
Step 2. If you would like a single postcode to be validated, please add it to the first field leaving the second one blank:
or switch to the text area input and add all of the postcodes separated by a comma for single values or a hyphen for ranges:
Step 3. After the Shipping Area is saved, it can be used in the Shipping Restriction Conditions section:
Here is how the Shipping Restriction is going to look on the frontend when one of the Shipping Area postcodes is entered:
If a postcode doesn't belong to the Shipping Area, the previously blocked shipping option will be available:
You can also try blocking some delivery methods by using the Shipping Postcode condition of the Shipping Restriction like so:
You should enter the beginning of a postcode (or an entire postcode) and the restriction will be applied to all of the postcodes that start with the mentioned combination, regardless of the case used: