Blog

How to Restrict Free Shipping in Magento
Online stores often offer free shipping to their customers. But what if you want to restrict free shipping to certain locations or minimum cart totals? We recently had to set up free shipping on orders over $50 to the continental U.S. (sorry Alaska and Hawaii) for a client. We'll show you how we did it using Magento, our open-source eCommerce platform of choice.
With Magento's built-in settings, you can achieve free shipping in one of two ways: the free shipping method, or free shipping using a specific carrier method.
The free shipping method simply gives the store owner the option to offer generic free shipping not specific to any carrier. This is equivalent to Amazon.com's Free Super Saver Shipping. The customer can select the free shipping option, and the store owner ships the order using whichever carrier and method they would like to use. This shipping option allows the store owner to set a minimum order total to qualify for free shipping.

Free shipping method settings
The second built-in setting is carrier free shipping. Using this method, you can specify in a carrier's shipping settings which method (if any) should be free. Like the generic free shipping method above, you can set a minimum order total for the customer to qualify for free shipping. For example, if I use UPS to ship all of my orders, I'll go to the UPS shipping settings in the Magento System Configuration. I can then specify a free shipping method (such as Ground), and a minimum order requirement.

Free shipping using carrier method settings
These two built-in free shipping settings may work well for many online stores, but some store owners would like to only offer free shipping to certain geographic regions. In our case, we were working with a client who wanted to restrict free shipping to the continental U.S due to the high cost of shipping to Alaska and Hawaii. Unfortunately, Magento's shipping settings do not allow restricting free shipping based on geography. Luckily, however, there's an easy way to create free shipping based on geographical regions using Magento's built-in shopping cart price rules."

To access Magento's shopping cart price rules, go to the "Promotions" menu.
Magento calculates shipping costs for carriers like FedEx and UPS based on zip codes. In order to achieve free shipping for specific geographical regions, you need to determine the set of zip codes associated with those regions. For our example, we wanted to provide free shipping to the U.S. excluding Alaska, Hawaii, and U.S. territories. So we did some research about U.S. zip codes, and formulated a set of rules to apply free shipping to only the continental U.S. In addition, we also set a minimum order amount of $50 in order to qualify for free shipping. Click on the "Conditions" tab to define these rules.

This set of rules includes orders $50 or greater, shipped to the continental U.S.
To reiterate this, the set of all zip codes for locations in the continental U.S. (excluding of course Alaska, Hawaii, and U.S. territories) can be defined as follows:
- Zip code is greater than 00900 but less than 96200
- Zip code is equal to or greater than 97000 but less than 99500
Finally, you just need to define what will happen when the conditions are met. In this case, we want tp provide free shipping when the conditions are met (the location is within the continental U.S. and the order total is $50 or greater). To do this, we click on the "Actions" tab. Under the "Free shipping" setting, change it to "For shipment with matching items."

Set the action to include free shipping on qualifying orders.
Congrats! You now have free shipping set up for any order equal or exceeding $50 shipped within the continental United States. To check it, take a look at the cart's shipping estimate calculator.

Compare the shipping estimates for Anchorage, Alaska and Atlanta, Georgia.
Creating your own rules
What if you want to provide free shipping to Alaska and Hawaii, but you don't want to provide it to some other region? You can apply the same technique for mapping and excluding certain zip codes. Check out this map and list for reference:
The first digit of the ZIP code is allocated as follows:
- 0 = Connecticut (CT), Massachusetts (MA), Maine (ME), New Hampshire (NH), New Jersey (NJ), Puerto Rico (PR), Rhode Island (RI), Vermont (VT), Virgin Islands (VI), Army Post Office Europe (AE), Fleet Post Office Europe (AE)
- 1 = Delaware (DE), New York (NY), Pennsylvania (PA)
- 2 = District of Columbia (DC), Maryland (MD), North Carolina (NC), South Carolina (SC), Virginia (VA), West Virginia (WV)
- 3 = Alabama (AL), Florida (FL), Georgia (GA), Mississippi (MS), Tennessee (TN), Army Post Office Americas (AA), Fleet Post Office Americas (AA)
- 4 = Indiana (IN), Kentucky (KY), Michigan (MI), Ohio (OH)
- 5 = Iowa (IA), Minnesota (MN), Montana (MT), North Dakota (ND), South Dakota (SD), Wisconsin (WI)
- 6 = Illinois (IL), Kansas (KS), Missouri (MO), Nebraska (NE)
- 7 = Arkansas (AR), Louisiana (LA), Oklahoma (OK), Texas (TX)
- 8 = Arizona (AZ), Colorado (CO), Idaho (ID), New Mexico (NM), Nevada (NV), Utah (UT), Wyoming (WY)
- 9 = Alaska (AK), American Samoa (AS), California (CA), Guam (GU), Hawaii (HI), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Oregon (OR), Palau (PW), Washington (WA), Army Post Office Pacific (AP), Fleet Post Office Pacific (AP)

Map of U.S. Zip Code allocation
Subscribe
Search
Addoa on Twitter
Addoa Excellence
We know your vision is important to you. That's why our vision is to help you share yours. When you use Addoa for your creative needs, you'll see the difference excellence makes on your project. Our superior quality, strong communication, attitude and unbeatable value make Addoa the right choice for any project.
Client Testimonials

Free project estimates anytime

Comments
Awesome post. Ironically, I just set up similar rules 3 days ago but was glitching related to a problem where I want only certain products to have free shipping. Today, when I went to search the issue, your very well laid out post made my rules mess much easier. Thanks.
Glad I could help! I struggled for a while to figure out to define the free shipping rules. It was kinda of fun to forensically figure out the zip codes though.
This article is exactly what I'm looking for, problem is I have checked my work 3 times and it does not work. Every time this rule is active it automatically applies FREE shipping to UPS ground no matter what the order value. (I set it to be $100 or more). I know it is set up right because if I enter a coupon CODE for this it works perfectly. If I remove the coupon code so it apples automatically I just defaults to FREE Shipping no matter what.
Any thoughts?
If you don't need to restrict by geography...
Simply using the built-in carrier settings with NO promotion rules:
1. Set your free shipping method to Ground (or whatever you want).
2. Set "free shipping with minimum order amount" to enabled.
3. Set "minimum order amount for free shipping" to 100.
If you DO need to restrict by geography...
In the built-in carrier settings:
1. Set your free shipping method to Ground (or whatever you want).
2. Set "free shipping with minimum order amount" to disabled.
3. Set "minimum order amount for free shipping" to 100.
And then set the promotional rule as defined in the article. Make sure you have the "subtitle is equal to or greater than 100" rule set in place.
Let me know if it's still not working for you.
Outstanding post and quite helpful. Do you have any insight into the following scenario:
My client ships perishable goods and ground ships them within a 6 state region (ground gets there in a day or 2) however they have to 2nd day air shipto all other states to prevent spoilage. They want the shipping method based on the location of the shipment, but do not want to offer the customer a choice between the two. Can you set up rules to force a particular method based on location as well? I haven't been able to get my head around this one.
Hey Nate,
Magento does have the ability to only allow a shipping method for specific countries. It does not, however, have the built-in ability to only allow a shipping method for specific states or zip codes. Theoretically, I suppose it would be possible to tweak the module to pay attention to a different geographical region (like states or zip codes) instead of countries. I haven't tried this, but I think I remember seeing a third-party module that does this without affecting the core code.
I think the best solution to your problem is Magento's built-in table rate shipping module. With the table rate module you can specify a table of fixed rates for destination vs. weight, price, or number of items ordered. The owner then chooses whichever shipping method they would like to use, rather than being tied to a specific carrier. So for example, you could charge everybody in Kansas $10 shipping per item and everybody in Florida $15 shipping per item. Or instead you could charge the shipping rate by the weight of the order or the order total crossed with the destination.
You can see an article about how to set up table rate shipping here:
http://www.magentocommerce.com/knowledge-base/entry/how-do-i-set-up-tabl...
Great post, this is a much easier and more elegant method than using table rates as the Magento team suggest.
One question though, why is it necessary to both exclude Alaska and Hawaii AND include all other zip codes? Shouldn't the Shipping State/Province is not Alaska and Shipping State/Province is not Hawaii be sufficient?
I'm going to do some testing now on this right now, but figured you had probably exhausted the possible scenarios, so maybe you have some insight regarding this already.
Thanks.
I included the zip code rules for two reasons: because it's more precise and because shipping for the carriers (i.e. UPS and FedEx) is based on zip code, not state. By explicitly including just the zip codes of the lower 48 states, no one will get free shipping if they aren't in the contiguous U.S. This effectively excludes Alaska and Hawaii, but also excludes all U.S. territories like Guam, Puerto Rico, etc. that have U.S. zip codes.
In this sense, the zip code rules are necessary and the state rules are redundant and therefore optional.
Ah ha! I hadn't thought about US Outlying islands, thanks!
Thanks again for the great tip, this is working perfectly for us.
In addition to offering free shipping over a certain threshold, we also offer flat rate shipping on all orders in the Continental US below that point. Any creative ideas on how we can limit that flat rate shipping option to the lower 48? Obviously that can't be done with the default flat rate module, and I can't think of a way to do it using the same method as this article.
I would like to continue using the standard UPS lookup based on package weight for air shipments, so I really don't want to go to table rates if it can be helped.
My best advice is to use table rate shipping alongside the standard UPS module. Without table rates only defined for the lower 48, the method will only show up for the lower 48. The FedEx module will show up for everybody and the customer can choose whichever shipping method is cheapest (or whichever they prefer).
Ah, I didn't realize table rate shipping could live "alongside" other shipping methods, I thought it would show up as it's own shipping method during checkout.
Clearly I'll have to experiment with this in our development platform.
Thanks for the feedback!
No problem. The table rates do show up as their own shipping method, but it will show up in addition to any other shipping methods (like UPS). If the table rate isn't defined for a region, the shipping method shouldn't show up at all, but I haven't personally tested this. You can label this shipping method whatever you like. For example, you can call it "flat rate shipping" if you want.
Yep, that's exactly what I was thinking, I'll configure it for flat rate shipping, and then if the destination is outside the lower 48, or the order total is over our free shipping limit it should remain hidden.
Thanks a bunch!
Jason
Good job! THANKS! You guys do a great website, and have some great contents. Keep up the good work.
best regards,
Thanks! great tutorial.
Post new comment