Skip to main content
  • Agency for web development
  • Content Management with Primer
  • Open Source Leadership with Drupal
    Language
  • Deutsch
  • English
  • Contact
Site logo
Agentur für Webentwicklung
  • References
  • Services
  • News
  • About us
  • Agency for web development
  • Content Management with Primer
  • Open Source Leadership with Drupal
close

Improvements and changes in Commerce 2.x

11. May 2017
Sascha Grossenbacher Porträt
Sascha Grossenbacher

The new version of Drupal Commerce has been rewritten from scratch, learning from what worked well and what was causing problems in Commerce 1.x.

In this blog post, we will focus on explaining some of the key differences we have seen so far and how they affect developers and users. 

Drupal Commerce

In a second blogpost we will focus on challenges we had in our first e-commerce project in Drupal 8.

Built on reusable (composer) components

Quite a few of the lower level API’s have been built as generic libraries that can be used outside of Drupal. This allows CommerceGuys to collaborate on those with other eCommerce systems outside of Drupal.

That means it is a requirement to use composer to maintain sites. That works great and is not a big problem for experienced developers, especially those used to other PHP frameworks or languages where a package manager is common. But it can be a problem for less experienced users and some hosting providers. The hosting provider we use for this project, platform.sh, has support for deploying projects using composer.

More functionality out of the box

Unlike Commerce 1.x, which provided only a minimal amount of features and required a lot of site building and customization, Commerce 2.x is closer to Commerce Kickstart than a plain Commerce 1.x installation. It includes a number of other modules like Inline Entity Form to improve UX as well as many features that previously required additional modules like storing and reusing payment methods, stores/marketplace and much more.

That makes it a lot easier to start a new commerce project, especially when adding it to an existing Drupal site or building custom install profiles.

Different terminology and product structure

Instead of using Nodes that reference products, by default Commerce now provides two entity types, Products and Product variations that provide a similar functionality with a considerably better UX. Payment methods from 1.x (e.g. Stripe or PayPal) are now called payment gateways and a payment method is a specific way a user paid, e.g. a specific credit card.

It takes a bit of time to get used to it, but the new terminology makes sense and should make it easier to learn commerce for new developers.

Opinionated, customization through code/templates

Commerce 2.x has an opinion as to how a shop and checkout process should look and work. It also has fewer configuration settings and options as experience has shown that less experienced users often break their installation with the wrong setting. At the same time, the mentioned flexibility makes it easier to customize for developers. One example is the checkout complete message. In 1.x this is a configuration setting, but we never have built a commerce site where just changing that text was sufficient. In 2.x, it is a twig template, which already offers a lot more flexibility in being able to implement a completion page that looks good. The confirmation mail is similar, it is built from a twig template and looks good out of the box.

Designed to be extended, parts replaced and changed

Almost everything is a plugin and there can be multiple variants of everything. That includes for example the checkout flow, there can be multiple variants of that and each uses a plugin. Any entity can be “bought” if it implements a certain interface, and it is also possible to do a checkout without any products at all. A lot of UI components are organized as reusable form elements.
Based on what we have seen so far, Commerce 2.x has a good balance between a good out-of-the-box shop and checkout experience while remaining flexible and customizable for developers.

Don't miss the second part of this blog series! We will go in detail about our experience of Drupal Commerce 2.x in a customer project.

Drupal Mountain Camp 2025 in Davos

Kongresszentrum Davos Front
24. March 2025

This year's Drupal Mountain Camp was a complete success. Not only because we were able to take home another Splash Award, but also because of the people from the Drupal universe.

Read more

UNICEF Switzerland and Liechtenstein: Sustainable IT performance with MD Systems

27. February 2025

We supported UNICEF Switzerland and Lichtenstein in the process of "reducing their ecological footprint" and optimized their website performance at the same time.

Mehr lesen

Drupal CMS 1.0 released

drupal cms
16. January 2025

Drupal CMS 1.0 is the impressive first step in a challenging journey to make Drupal a better CMS product. A CMS that is ready to use without any complex configuration.

Read more

About MD Systems

MD Systems, headquartered in Zurich, is a unique team of international open source initiative leaders for the Drupal content management system.

With our experts for software architecture and design and our industry solutions, you digitize your organization successfully and efficiently.

MD Systems GmbH

Hermetschloostrasse 77, CH-8048 Zürich

Schweiz

+41 44 500 45 95

[email protected]

  • Contact
  • Impressum
  • Data protection
To top

© Copyright 2023 - 2024 MD Systems GmbH. Alle Rechte vorbehalten. Erstellt mit PRIMER - powered by Drupal.