Last updated November 15, 2012. Created by tgeller on October 1, 2011.
Edited by joshmiller, Rob C, Robokits, switch13. Log in to edit this page.
Commerce Shipping is Drupal Commerce's base system to calculate and display shipping prices.
Commerce Shipping includes an "Example shipping method", but otherwise relies on add-on modules for practical use. These modules define shipping methods such as UPS and the U.S. Postal Service; these in turn include shipping services, such as First Class and Overnight.
It integrates with the Physical Fields and Commerce Physical Product modules to calculate shipping rates based on weight and size information.
New Features
Commerce Shipping 2.0 is a complete rewrite of what the 1.x branch offered. It subdivides shipping methods into individual shipping services, giving you granular control over when each individual service from a provider like UPS should be available for an order. For example, you can use USPS for all orders within the U.S.A. and UPS for all other territories while requiring that certain products only ship UPS Next Day Air regardless of where they're shipping to.
Shipping rate calculation has also been improved to function much like the product sell price calculation in the core of Drupal Commerce. When shipping services are calculated for an order, they are represented as line items that have a base rate defined by the shipping method. The line item that is then passed through Rules for additional calculation, allowing you to add taxes and handling fees or perform complex calculations based on weight, distance, quantity, etc. to determine the final calculated rate.
These features and the API behind them provide a marked improvement over the shipping solutions we've developed before, including what we've worked on for Ubercart, giving you the utmost flexibility in determining how to calculate shipping for your site. We think that's a big deal.
Upgrading from 1.x to 2.x
If you've previously installed Commerce Shipping 1.x and have used it in production, you'll want to ensure you get the update process right to prevent any data from being lost in the update. The full update process is as follows:
- Ensure you're running the latest version of Commerce Shipping 1.x. As of right now, that is Commerce Shipping 1.1.
- Backup your site - particularly the database.
- Disable (but do not uninstall) any shipping method module on your site developed to work with Commerce Shipping 1.x. For example, if you have been using Commerce Shipping Flat Rate, disable that module. You should not disable any of the actual Commerce Shipping modules from this project.
- Replace the entire commerce_shipping module folder with the new Commerce Shipping 2.x module. Do not just copy the new files into the old directory, as the file structure has changed and you won't want to leave outdated files in the directory.
- Run update.php. If you're updating from Commerce Shipping 1.1, you should see a single update function, update 7100. It will begin to process your existing shipping line items in batches of 25 to update them and the orders they're attached to for the new shipping API.
- Uninstall the shipping method modules you disabled in step 3.
- If you were using Commerce Shipping Flat Rate, install instead the Commerce Flat Rate module and rebuild your flat rate shipping services in the new interface.
- Browse to Administration » Configuration » Workflow » Rules. Scan the list for "broken" rules that were created by Commerce Shipping 1.x shipping methods. Feel free to delete these rules after copying any necessary logic from them over to the new shipping method / service rule configurations.
Please note that because of the drastic differences in this module's API and points of integration with Rules, it simply isn't possible to automate the migration of shipping method rules from Commerce Shipping 1.x into Commerce Shipping 2.x. They will have to be manually recreated, so you should run the update in a test site to ensure you can recreate the shipping configurations used by your site post-update.
Additionally, the names of some fields, Rules conditions / actions, and price component types defined by the module have changed. If you have referenced these things from other Views, Rules, or custom code, you must update them when you migrate to Commerce Shipping 2.x.
We fully stand behind the migration and are happy to assist you if you have any difficulties. You can find us in the Commerce Shipping issue queue or in the #drupal-commerce on IRC.
Copying billing address to shipping address
As of May 7th, the ability to copy addresses between billing and shipping has been implemented in the 2.x-dev version. The plan is to bring this into a supported release shortly. Read below on how to activate this.
Steps on how to enable 'My shipping information is the same as my billing information.' checkbox / functionality on checkout pane:
- Download the current dev or git (october 21st '12) Drupal Commerce 1.x.
- Download the current dev or git (october 21st '12) Commerce Shipping 2.x.
- Run update.php if you already have Commerce installed.
- If you have not already, enable the Commerce Shipping module via the modules page.
- Visit: 'admin/commerce/config/checkout/form' and edit the 'Shipping information'.
- Check the 'Enable profile copying on this checkout pane, helping customers avoid having to enter the same address twice.' checkbox.
- Save the form by clicking on 'Save configuration'.

Now visit your checkout page, it should render a billing address and a pre-checked checkbox for the shipping address.
The end-result:
More Information
There is a whole lot more documentation for shipping on drupalcommerce.org.
Comments
Copy between billing & shipping?
How? Please....
CFAA.co | "Empowering Christians to make God-pleasing decisions in how they give, spend, save, insure, and invest."
nevermind. I figured it out.
nevermind. I figured it out.
CFAA.co | "Empowering Christians to make God-pleasing decisions in how they give, spend, save, insure, and invest."
cfaaadmin, 'nevermind. I
cfaaadmin, 'nevermind. I figured it out' is not very helpful to others searching for the same information. Would you mind sharing how you enabled this ability please.
Sorry for my harsh words
Thanks for the shipping modules and your work.
But,
this documentation is absolutely incomplete, and I'm sure no one receives a help of this content.
You can unpublish this documentation. The result is the same as published.
Sorry for my harsh words. But it's the reality.