Prevent Shipping to a Zone for Certain Items

Overview

Some merchants sell products online that have restrictions based on local or State regulations.

For example, shipping items like alcohol or ammunition often requires preventing shipping to specific places where shipping is prohibited by local or state regulations.

ShipperHQ provides two easy ways to restrict products which are outlined below.

Requirements

You need first to set up your carriers and origin(s) in ShipperHQ.

Let’s assume this is done and you have UPS set up as a carrier along with 1 origin (which is where you dispatch from).

Define Shipping Zone

Before creating a shipping rule or shipping group to be restricted, you will need to create and define the zone that the product(s) can ship to.

For example, we’ll use a zone titled “Unrestricted Alcohol Zone” where only the states, cities or zip codes we can ship to are included.

See our setup guide for Shipping Zone Configuration here for more details.

Define Shipping Group

You also need to set up a shipping group.

Shipping groups will allow you to categorize goods together so that you can apply rules to them.

See steps for Shipping Group Configuration here.

In this example, we’ll create a shipping group called ALCOHOL.

Setup

SET UP A: Use Shipping Group to Prevent Shipping to Zone

With shipping groups you can restrict the shipping zones they display rates to.

This is often times the best approach for restricting shipping for specific products.

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.

Example showing how to restrict shipping to specific zones. This section is under Optional tab of the Shipping Group.

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 rates will not be displayed.

If this is a common scenario for your shipping quotes, please see this article on shipping groups that details how to rate groups as separate shipments here.

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.

Click new to start configuring a new shipping rule.

2. Choose Hide Methods

Location to select Hide Methods as the action to be performed by shipping rule.

3. Under the Shipping Methods section, choose all methods to prevent all rates from being displayed except for the designated zone.

Click Select All to select all the shipping methods in the list.

4. On the next prompt to select the conditions that apply for this rule, select Shipping Zones.

Location to choose Shipping Zones as a condition to apply the rule.

5. If your zone was created to include the states, cities, or zip/postal codes where the ALCOHOL products cannot be shipped, then select Shipping Zones Include on the following prompt.

Example showing to configure shipping zone for this rule to hide the methods for this zone.

6. If the zone you created is meant to include only the areas where you can ship ALCOHOL products, then you’ll set this to Shipping Zones Do Not Include and select the zone.

In this case, the zone we’re using was setup to include the areas where we can ship these products, however, it is important to know that this designation will depend on how the Shipping Zone was configured.

Sample configuration to hide shipping methods when certain zone is not included.

7. Be sure to add a title for the new rule so that it can be easily identified in the shipping rules list and when testing.

Example showing summary of the shipping rule with all the configurations.

8. Click “Finish” to save the new rule. This will apply the rule immediately.

Once the rule has been created, we recommend using the “Test your Rates” feature to confirm the new rule is working as intended.

The rule configuration outlined here will result in all shipping rates being hidden unless the destination address is within the unrestricted shipping zone.

 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 on your website’s checkout.

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?