Prevent Shipping to a Zone for Certain Items


Let’s say you wish to prevent shipping alcohol to certain states.  ShipperHQ fully supports this.


You need first to set up your carriers and origin(s) in ShipperHQ.  Let’s assume this is done and you have a UPS carrier, and 1 origin (which is where you dispatch from).

Define Shipping Zone

Before setting the rule, you need to create and define the zone that the alcohol can ship to. See steps for Shipping Zones Configuration here.

Define Shipping Group

You also need to set up a shipping group. Shipping groups allow you to categorize goods together so that you can apply rules to them. See steps for Shipping Group Configuration here.

In this scenario, we need a shipping group ALCOHOL.  Personally, we recommend using capitals just as it makes it less likely to misspell them.


There are 2 ways to set this kind of rule up: restriction on shipping group directly, or by shipping rule.

SETUP A: Use Shipping Group to Prevent Shipping to Zone

With shipping groups you can restrict the shipping zones they display rates too. In this case, we don’t want to show shipping to certain states.

  1. Edit the Shipping Group you defined above. In our example, that’s the ALCOHOL group.
  2. In the Optional panel, under the Restrict to Specific Destinations dropdown, select the Zone you created that alcohol can ship to.
  3. Only set the “Restrict to Shipping Methods” section if you want this group to show certain methods only (i.e. show ground only)
  4. Don’t worry about Advanced Settings
  5. Save the group

Please Note: When a shipping group has a zone defined in “Restrict to Specific Destinations” no other zones will be eligible, regardless of the other items in the cart. This combines with other shipping group restrictions, so if you have one group in the cart that can only ship to NY and one that can only ship to CA they will both cancel each other out and no rates will be displayed.

SETUP B: Use a Shipping Rule to Prevent Shipping to Zone

With shipping rules against a shipping group, you can hide rates when the group is in the cart. This accomplishes the same setup as above, but allows for more conditional flexibility.

  1. Go to Shipping Rules and click the +New button
  2. In the Basic panel, give the rule a descriptive name (i.e. Prevent shipping ALCOHOL to certain states)
  3. Under the Shipping Methods section, choose all methods. This is because you want to prevent all rates to certain zones.
  4. In the Conditions tab, find the dropdown for Zones Include > choose the Alcohol Friendly Zone you created in the beginning
  5. Still under Conditions, find the Shipping Group(s) Includes ALL dropdown > choose your product group. In our case, ALCOHOL.
  6. In the Action tab under the “Action to Perform” section, set I want to… to “Hide my selected Shipping Methods”
 NOTE: For Magento 1 and 2 there is a checkbox for “Show Error Message when this Rule Applies”. If ticked, you can enter a custom error message when this rule applies. This is useful if, for example, you want to display a message to the customer along the lines of “Alcohol cannot be shipped to your destination”.

Assign Products to their Shipping Groups

Be sure to assign your relevant products to the new group before you test. For this example, you will see that rates for ALCOHOL are returned for alcohol friendly states defined in your zone, and no rates will return when ALCOHOL is in the cart for non-alcohol friendly states.

Test Your Rates

Verify that your carriers and rules are working and see how they will display in your checkout right from the ShipperHQ dashboard.

Learn More

Was this doc helpful?