Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Video: Shipping in Drupal Commerce 2.x is Better Than Ever!

Parent Feed: 

“Shipping” in Commerce 1 meant “get shipping rates.” End of story. If you wanted to do something crazy like actually receive the item or put it in a box in the warehouse, you were out of luck. You could integrate with another system, but otherwise you were really just a storefront.

But Commerce 2.x is a different story. Now you can go from getting rates all the way down to actually receiving the shipment.

Some background

With Commerce 1, we realized we had shipping that didn’t do anything other than give rates (and if you have free shipping, you don’t even care about that). So we set out to fix that in Commerce 2.x.

Shipping is actually a pretty complicated process. Once someone purchases a product, how does it actually get to them? You need to print off labels that have barcodes and will work for UPS and FedEx and any other delivery service you plan to use. You have to know what boxes to put stuff in, what goes in what box, what gets shipped out from what location, etc.

Commerce 2.x now has a nice shipments API that can handle all of that.

New functionality

Everything has a plugin interface now. Take packing, for example. You can have a packing algorithm that is really simple—i.e. everything goes into a theoretical box of infinite size. Or the algorithm can be more complicated—you can say these things can’t get packed with this, or these things are chairs, so they stack a certain way.

For every step of the shipping process (getting rates, printing labels, doing packing slips, and so on) you can use the functionality that’s now built in to Commerce 2.x, or you can replace any or all of those pieces with other providers. That could be delivery services like FedEx or UPS, or it could be some sort of third-party shipping provider that handles the boxing, or it could be Amazon if you do your fulfillment through them.

The bottom line

Shipping in Commerce 2.x now covers the whole flow of shipping, from ordering to having the package arrive at someone’s house. It’s a massive improvement over Commerce 1, which only gave the rates.

To learn more, check out our High Five episode “Drupal Commerce 2.x—Shipping.

Subscribe to our YouTube Channel for more Drupal Commerce goodness!

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web