How To Restrict Shipping Locations In Magento 2?

How to Restrict Shipping Locations in Magento 2?

Shipping restrictions are sometimes necessary and applied for legal and financial purposes. Every country’s laws vary and so online merchants have to abide by them. Online store owners may want to apply shipping restrictions in one of the following scenarios.
    • The product is banned in the location/country thus shipping restrictions by location apply.
    • The destination country’s customs laws, delivery company or airline restrictions
    • The product exceeds the allowed weight and dimensions.
    • The cart total does not qualify the shopper for shipping.
    • The nature of the product i.e. Fire extinguishers, perishable food, etc.

As a reference, you can see the list of the products that can’t be shipped from the USA.

Default Magento 2 offers very limited flexibility when it comes to shipping restrictions. It only allows limiting shipping by country or region.

How to Configure Shipping Restrictions by Location in Magento 2?

You can configure countries and regions where you allow shipping. To do so, login to the Magento admin panel.
    • Navigate to Stores -> Configuration
    • In the General Tab, under the Country Options.
    • The Allow Countries multi-select menu gives you the option to select the countries where you allow your products to be shipped to. To select a country, unmark Use system value checkbox as Magento allows shipping to all the countries by default.

For example, if I select Canada & the United States as the allowed countries for shipping, only these countries will be displayed in the Country dropdown at the checkout as shown below.

Solution to Magento 2 Restrict Shipping Locations

As you can see, Magento only allows shipping restrictions by country. It does not allow shipping restrictions based on the products, categories, or cart attributes and customer groups, etc. For example, what if you want to enable free shipping for a specific customer group or want to hide the ‘Cash on Delivery’ option for high-priced products, etc.

To achieve shipping restrictions based on various other parameters, FMEextensions offers a feature-rich Magento 2 shipping restrictions extension. This extension allows merchants to restrict shipping methods based on various product, cart and customer’s parameters by applying conditions.

How to Use the Extension to Restrict Shipping Locations?

The extension gives you the flexibility to restrict shipping locations by Postcode, Region, State/Province, and Country. To do so, login to the extension’s admin panel.
    • Navigate to FME Extensions -> Manage Restriction Rules -> Add New Rule.
    • Scroll down to Conditions option.
    • Here you can add conditions based on the Postcode, Region, State/Province, and Country.

Other Features the Extension Offers

Apart from shipping restrictions by location, the extension offers restrictions on a variety of other parameters.
  • Shipping Restrictions on Cart Attribute: You can enable shipping restrictions on cart attribute such as the cart amount, quantity, weight, etc.
  • Shipping Restrictions by Date & Time: You can also easily restrict or hide certain shipping methods for a specific time slot.
  • Restrict by Customer Groups, Customers & Store Views: The user-friendly interface of the extension lets you restrict certain shipping methods by specific customers, customer groups or store views.
  • Shipping restrictions by category & product attributes: The extension also allows you to block or hide certain shipping methods based on the product attributes and categories/sub-categories.

Also, take a look at FME's Store Pickup Magento 2 Extension to add the "in-store pickup" shipping option to your store.