Drupal Commerce Blog

What's happening in the world of Drupal Commerce.

Drupal Commerce 1.4 Release

Commerce Guys recently hosted a workshop to prepare the roadmap for Drupal Commerce 2.x on Drupal 8. During the week, we spent a bit of time reviewing and committing the final patches needed to release Drupal Commerce 1.4. The new version is a maintenance release incorporating 87 patches from 40 different contributors around the world - I love it! These patches add a variety of new features to the core of Drupal Commerce and make it more performant and suited to international usage.

I've summarized the key changes in this post. The full list of changes and update instructions can be found in the release notes on drupal.org.

New features

The Add to Cart form and checkout form have both seen improvements. Most notable on the checkout form is the new setting to allow copying of fields from one customer profile to another. This feature was a part of the Commerce Shipping module but was moved to core and designed to work server side across multiple checkout pages and even between customer profile types that may have different fields. The Account information checkout pane was also updated to support e-mail address verification through double entry.

We included a variety of Views integration improvements, including adding a missing handler, updating area handlers for Views 3.5, supporting redirect destinations on our entity operation links, and adding a node filter to only show product display nodes.

Finally, we added a few features to make it simpler for site builders to build product pricing rules. Foremost among these is a new Price comparison condition that supports multi-currency price comparisons and accepts input in major currency unit decimal values instead of minor unit integer values (i.e. compare in Dollars or Euros instead of Cents). We also added a read only computed property allowing you to use the generic Data comparison condition against these major unit decimal values.

Performance

The primary performance improvements involve lowering Drupal Commerce's memory footprint. We reduced the number of times we build the full array of entity information and reduced the number of Rules loaded into memory during tax calculation.

Previously, the Cart module duplicated some queries during shopping cart order loading, so a small static cache was moved earlier in the cart loading process to stop them.

Finally, some operations (like creating a new product type or deleting a tax rate) require menu items to be rebuilt, but instead of doing so immediately (and potentially multiple times on a single page request), we are delaying the rebuild by using the 'menu_rebuild_needed' variable instead of directly calling menu_rebuild(). Contributed modules that followed Drupal Commerce's lead in directly calling menu_rebuild() should also be updated to use this variable instead.

Internationalization

With every new release, Drupal Commerce becomes better suited for use in more countries - thanks especially to the contributions of community members from these countries doing testing and providing valuable feedback. Drupal Commerce 1.4 includes currency format updates and RTL support in our CSS files. To improve product translation and management, plach contributed a fresh integration to the latest development in the Entity Translation module, and OnkelTem ensured the product language property is properly exposed to the Entity API and Rules.

Additionally, we found a need for 0% VAT rates to actually be applied and displayed in some instances, so the tax calculation code and inline documentation has been updated accordingly. Developers building sites requiring VAT should check out the Commerce European Union VAT module for additional assistance in getting taxes right.

Release notes

For more information on the notable bugs fixed since Drupal Commerce 1.3, notes on the update process (including minor API changes), and the full changelog, please refer to the release notes on drupal.org. While it was many months since the 1.3 release, we expect to have a Drupal Commerce 1.5 in the near future after a final release of Commerce Shipping 2.0.

Keep an eye on the blog for the Drupal Commerce 2.x roadmap, as well. We had a very productive week in Paris and can't wait to share the results.

Ryan Szrama
Posted: Oct 31, 2012