Implementing a Checkout Flow resolver in Drupal Commerce 2.0


What are we going to learn?

Drupal Commerce 2 allows you to support multiple checkout forms. This is pretty cool because it allows you to have different checkout experiences for your customers based on what they are purchasing. We're going to dive into why you would want to use a checkout flow resolver and how to implement one.

  • Understand the order and checkout relationship
  • Implement a checkout flow resolver service

Drupal 8 Development Cookbook - Second Edition

During DrupalCon Vienna, the second edition of the Drupal 8 Development Cookbook was published! The Drupal 8 Development Cookbook published just over a year ago, right after Drupal 8.1 was released. I had written the book for 8.0 with "just in case" notes for what might change in Drupal 8.1. What I was not prepared for: how well the minor release system worked and provided rapid gains in feature changes.

Migrated: Now on Drupal 8!

My personal site is now officially migrated onto Drupal 8! I had first attempted a migration of my site back when Drupal 8.0 was released but had a few issues. With Drupal 8.3 it was nearly flawless (maybe even 8.2, but I had put the idea back burner.) I did have some interesting issues to workaround

Missing filter plugins

My migration process was halted and littered with errors due to missing plugins, specifically around my text formats. The culprits were:

DrupalVM and CircleCI: Deploying for the wins

DrupalVM is a tool created by Jeff Geerling that “makes building local Drupal development environments quick and easy” for Drupal. It is built using Vagrant and provisioned with Ansible. Since it uses Ansible, it also provides a means to support a production environment deployment. This allows for a repeatable and determinable environment when developing and deploying to remote servers.

Setup Drupal Commerce for CI and Behat testing

I can proudly say that we have been on top of our test coverage in Drupal Commerce. Back in June of 2016 we had removed any trace of Simpletest based tests and moved over to PHPUnit Unit, Kernel, Functional, and FunctionalJavascript tests. Once using PhantomJS for JavaScript testing landed in core we jumped ship. Test coverage is great for the individual project because we can ensure that we ship an (assumedly, mostly) bug-free product. But I believe we should do more than that.

Conductor, a Composer UI

Developers have many tools. We have version control systems, we have dependency management tools, we have build and task automation tools. What is one thing they all have in common? They are command line tools.

However, the command line can be daunting to some and create a barrier to adoption. We’re currently experiencing this in the Drupal community. People are considering Composer a barrier to entry, and I believe it’s just because it’s a command line tool and something new.

Managing Your Drupal Project with Composer

Drupal Commerce was started without writing any Drupal code. Our libraries set Drupal Commerce off the island before Drupal was able to support using third party library not provided by core.

Drupal now ships without third party libraries committed, fully using Composer for managing outside dependencies. However, that does not mean the community and core developers have everything figured out, quite yet.