Drupal Commerce Blog

What's happening in the world of Drupal Commerce.

Commerce Core 2.32 released October 19, 2022

Commerce Core 2.32 is a maintenance release providing PHP 8.1 compatibility fixes, a requirements bump to Drupal 9.3, and a handful of test fixes. A dozen folks contributed code and patch review to make it happen, with maintainer Jonathan Sacksick (jsacksick) landing a variety of UI improvements during the course of Centarro’s development sprint at DrupalCon Prague.

One notable addition is the definition of an entity label for draft orders, which includes shopping carts, alongside an update to the label for placed orders. Orders are “placed” via a customer completing the checkout process or a store manager placing it via the order management interface, at which time they are assigned order numbers. Placed orders now have a label of “Order ###”, where ### is that assigned order number. Draft orders will use “Draft ###” or “Cart ###”, where ### is the serial numeric order ID.

Ryan Szrama
Posted: Oct 19, 2022

Commerce PayPal release adds Venmo support

Centarro held a productive sprint at DrupalCon Prague on all things Drupal Commerce. Goals for the sprint included planning future Commerce Core improvements, packaging full releases of the modules included in Commerce Kickstart, and catching up on some long overdue marketing tasks. That including rolling out a new project homepage and planning an approach for the project blog to focus on release announcements - like this one!

Ryan Szrama
Posted: Oct 8, 2022

What's new in the Commerce 2.10 release?

We made many important improvements to Drupal Commerce over the summer, including an improved promotions UI, BOGO offers, and product category conditions in the 2.8 release and full list price support with the 2.9 release. After a long sprint to the finish, we’ve now finally released 2.10, one of our largest releases to date that resolves 39 issues and feature requests.

Product administration improvements

Six years ago we released the first stable version of Commerce Kickstart 2.x and the new (at the time) Inline Entity Form module, which allowed us to manage multiple product variations from a single product page form for the first time. Since then, Inline Entity Form has become a popular Drupal module and a recommended way to manage products in Drupal 7. When we started developing Commerce 2.x for Drupal 8, we ported over Inline Entity Form and the previous approach to managing products, but now we’re ready to take another step forward to advance the usability and performance of product management.

As of the 2.10 release, product variations are managed on their own tab of the product page form. This follows the same UI pattern we established for coupons within the promotions UI.

Product variations shown on their own tab.

Moving variations to their own tab allows us to extend the UI in future releases, specifically to add bulk operations for tasks such as price updates, image replacement, and even the creation of a full set of variations. We foresee other modules adding their own elements to the tab, like the Commerce Pricelist module adding a “Prices” dropbutton item to provide quick access to every price for a variation on multiple price lists.

Having variations on a separate tab would be a bit much for products that always only have a single variation, so we’ve made sure to accommodate that use case in the new version. Each product type’s settings form includes an “Allow each product to have multiple variations.” option that when disabled reverts to the inline editing experience for products of that type.

Inline product editing for single variations.

Query access filtering

If you create a new role for your merchant and only give it the “Book: View products” permission, you’d expect users with that role to be able to book products but no others. In Drupal 7, our solution for this was a generic query access API in Drupal Commerce itself that filtered entity loading queries based on user permissions.

To achieve this same result in Drupal 8, we've rebuilt this API and added it to the recent 8.x-1.0-rc1 release of the Entity API module. Commerce is now using it for administrative listings of products, orders, and stores. The API adds a QueryAccessEvent to allow modules to alter the access conditions, making it possible to apply further filtering (e.g. only show the user’s own store). Next we will extend the filtering to Search API to filter customer facing listings.

User-driven API improvements

Over 4,000 websites have launched on Commerce 2.x in the past year, pushing us up over 6,000 in total. As developers launch their projects, we keep our lines of communication open to hear about all the things that annoyed or hindered them, and we work to improve our APIs as a result. Several examples that made it into this release include:

(Note that as a result of the last two, if you have overridden the PaymentInformation or PaymentProcess panes on your site, you will need to update them for the new release.)

We love to hear stories of the great things you’re doing with Drupal Commerce, and we’d also love to improve the core APIs and data model to better support you, too. Feel free to join us and hundreds of other developers in the #commerce channel on Drupal Slack for real-time discussion or post your proposals directly to the issue queue for discussion.

Bojan Zivanovic
Posted: Oct 22, 2018

A May Full of Drupal Commerce Releases

May was one of our most productive months to date. It was full of releases for the core Commerce modules, our standalone PHP libraries, and essential contributed modules that all work together to comprise Drupal Commerce. While I outlined the highlights in the roadmap issue on drupal.org, these wins are worth sharing more broadly to keep the rest of the Drupal community in the loop.

The biggest release of the month was Drupal Commerce 2.7, which included new features for currency formatting, address form configuration, and stored payment methods. It also fixed a handful of bugs that unblocked other module releases and updated core in response to improvements in our libraries and dependent modules.

We've long discussed how our standalone PHP libraries are exporting expertise off the Drupal island. Addressing and Internationalization, which have each been downloaded over one million times, are our two shining stars. We rolled new releases for each of them in May, improving even further Drupal Commerce's ability to solve the hardest parts of address entry / validation / formatting and currency localization. Refer to the price formatting change record from the 2.7 release to see how the new API is more flexible and performant as a result.

Additionally, we released Address 1.4 and Inline Entity Form 1.0 RC1. The latest Address release unlocks the customer profile’s address field to support collecting less detailed billing addresses. The Inline Entity Form release includes new product information management features, letting you duplicate product variations for faster product data entry.

Inline Entity Form product variation duplication

Thanks to generous sponsorship from Authorize.Net themselves, we've been able to dedicate several weeks to improving their integration this year. The resulting Authorize.Net RC1 release now supports eCheck, Visa Checkout, and 3DSecure payments! We also included several bug fixes related to duplicate customer and payment profiles that appear when migrating from an old system to Drupal Commerce, for example.

While not fully released yet, our Technology Partner integration for Avalara's AvaTax is nearing beta. Jace Bennest from Acro Media contributed heavily by refactoring the module to properly use a TaxType plugin while my co-maintainer Matt Glaman contributed additional fixes to our port from the Drupal 7 integration to prepare it for certification. Thanks, Jace / Acro Media!

When Matt wasn't working on the above contribs, he was collaborating with Lisa Streeter from Commerce Guys to bring Commerce Reports to its first beta release for Drupal 8. The new version takes a completely different approach from the Drupal 7 using lessons we learned developing Lean Commerce Reports. It denormalizes transaction data when an order is placed to support reports generation with or without the Views module, providing a better developer experience and much better performance. Check it out below! (Click to expand.)

Commerce Reports usage demo

We've also been hard at work improving the evaluator experience. The big release for that is Commerce Demo's beta1, which showcases what Drupal Commerce provides out of the box. It creates products and scaffolds out a full product catalog (pictured below). To get the full effect, try it out with our default store theme, Belgrade. The new demo module gets us closer to something like we had with Kickstart 2.x on Drupal 7 - a learning resource for site builders and a way for agencies to more easily demo and sell Drupal Commerce.

Demo product catalog in the Belgrade theme

Finally, I'm very excited to announce that Lisa Streeter is our new documentation lead! Expect some great things to come. She has already done fantastic work with the Commerce Recurring documentation and is working on revising our getting started, installation, and update docs.

Looking at June, we plan on finalizing the query level entity access API, which will allow us to better support marketplace and multi-store Drupal Commerce implementations. We expect to merge user registration after checkout completion, and we will also be focusing on address reuse / copying, Buy One Get One promotion offers, and more product management experience enhancements.

Bojan Zivanovic
Posted: Jun 1, 2018

Drupal Commerce 2.x: 2017 in review

Now that 2017 is over and we’re back from our well deserved holidays, it’s time to look at what the Drupal Commerce community accomplished over the past year.

There is no doubt that Drupal Commerce is one of the largest and most active projects in the Drupal community. The #commerce channel is now the most active channel on the Drupal Slack, with 550 members. Over a hundred modules have received contributions from several hundred contributors working for dozens of different agencies. Just a few months after the initial stable release, there are over 2000 reported installations with new case studies appearing every week!

Let’s take a closer look.

Bojan Zivanovic
Posted: Jan 11, 2018

Next steps for Drupal Commerce documentation

With the Drupal Commerce 2.0 release slated for September 20th, we are making an effort to provide excellent documentation so that our implementers and end users can work with Drupal Commerce efficiently. We also want to encourage contribution at all levels, such as documentation. I am happy to announce we have moved from using Sphinx, a Restructured Text documentation tool, to GravCMS. GravCMS is a PHP based flat-file CMS, which uses Markdown.

Why the change?

We found that while Sphinx provided robust features, it also added a high entry barrier for documentation contributors:

Matt Glaman
Posted: Sep 10, 2017

See what’s new in Drupal Commerce 2.0-rc1

Eight months ago we launched the first beta version of Commerce 2.x for Drupal 8. Since then we’ve made 304 code commits by 58 contributors, and we've seen dozens of attractive, high-performing sites go live. We entered the release candidate phase this month with the packaging of Commerce 2.0-rc1 (release notes), the final part of our long and fruitful journey to a full 2.0.

Introducing a new Promotions UI:

Some of the most exciting updates this Summer center around our promotions system. This work represents a huge leap forward from Commerce 1.x, as we've made promotions first class citizens in core. They power a variety of discount types and coupons, and now that they are in core we can ensure the systems are designed to look and work well on both the front end and back end.

Read on to learn more about what's new in promotions, payment, taxes, and more...

Bojan Zivanovic
Posted: Jul 21, 2017

Installing Commerce 2.x without Composer, with Ludwig

The average Drupal Commerce site depends on many external PHP libraries. Address needs commerceguys/addressing and Commerce needs commerceguys/intl. GeoIP needs geoip2/geoip2 and Search API Solr needs solarium/solarium. Each payment gateway needs a matching SDK. These libraries must be downloaded separately, because license constraints prevent us from committing their code to drupal.org itself. For the past 5 years, the primary and only way to download and use PHP libraries has been Composer, a command line tool.

Composer works per-project, meaning each Drupal install has one folder for all PHP libraries it requires, regardless of which module needs which. This allows Composer to detect and prevent conflicts such as incompatible library versions. Composer also recursively resolves dependencies, automatically installing and updating packages required by other packages. This is a major benefit to Drupal site administrators compared to previous tools like Drush Make. However, Drupal's reliance on the Composer-generated autoloader makes it impossible to upload manually downloaded libraries, making Composer non-optional.

Read on to find out how we're making Composer optional...

Bojan Zivanovic
Posted: Jun 2, 2017

Drupal Commerce 2.0 Enters Beta

During the Commerce 2.x session at DrupalCon Dublin we officially tagged Drupal Commerce 2.0-beta1, our first production ready release. This does not mean it is feature complete or bug-free, but it does mean that from this point on, we support updating between 2.x releases - a key requirement for production usage. Start a Drupal 8 eCommerce site today, and you will be able to update your way to the full 2.0 release and beyond.

Matt and Ryan at DupalCon Dublin
Photo credit Will Jackson during the "Launching online stores with Commerce 2.x on Drupal 8" session.

For a quick overview of our project philosophy and the improvements we've included in Commerce 2.x, watch our session from DrupalCon Dublin.

The session heavily features the Sport Obermeyer case study, one of the first major eCommerce projects built on Drupal 8 by Bluespark and Commerce Guys. Their project influenced and shaped Commerce 2.x development in a big way, validating our ideas and providing solid use cases for features like fancy attributes, promotions, coupons, and more.

Additionally, we helped build the project as a single site serving three unique customer personas with a different purchasing workflow for each one. That drove development on our add to cart and checkout flow APIs, ensuring they have the needed flexibility to allow parallel implementations from day one. In addition to the case study linked above, check out Matt Glaman's interview with Bluespark for more information.

So... what has changed since alpha4?

Read on to find out...

Bojan Zivanovic
Posted: Oct 6, 2016

Commerce 2.x: Unit, Kernel, and Functional Tests Oh My!

At the end of May, I made an initiative to move all of the Drupal Commerce tests away from Simpletest and to use the available test classes built off of PHPUnit. Why? Simpletest is a test framework within Drupal and not used by the PHP community at large.

With the KernelTestBaseTNG™ issue, Drupal core officially moved to being based on top of PHPUnit for Kernel and Unit tests. Soon more test types were to follow, such as browser tests and JavaScript testing.

Death to Simpletest, Long Live PHPUnit, Mink, and PhantomJS

We now have PHPUnit as our test framework, the choice of the greater PHP community. The browser tests use the Mink browser emulator, which anyone working with Behat should be somewhat familiar. Testing JavaScript is done by pointing PhantomJS configuration to Mink. No longer are we limited to the functionalities of Simpletest and our community to develop it.

Matt Glaman
Posted: Jun 21, 2016

Pages

Subscribe to RSS - Commerce 2.x