Drupal Commerce Blog

What's happening in the world of Drupal Commerce.

Upgrade paths between Drupal 8 module versions

Over time, modules update their shipped configuration such as rules, views, node types. Users expect to get these updates when they update the modules. For example, Drupal Commerce 1.x provides over eleven default views and rules. From release to release, these Views and Rules were enhanced with new features or bug fixes reported by the community.

Take the order management view. In a future release of Drupal Commerce, we may add a newly exposed filter to the view. In Drupal 7 the view would automatically be updated unless it was overridden. That is not the case in Drupal 8.

Drupal 8 introduces the Configuration Management system. While robust, it changes how we work with the configuration in comparison to Drupal 7. Instead of a module owning configuration, configuration is now owned by the site. When a module is installed, its configuration is imported. On module update, no configuration updates are performed. Instead, the module must write an update hook to perform one of the following updates:

Matt Glaman
Posted: Apr 22, 2016

Commerce 2.0 alpha3 released

It's time show you what's kept us busy in February. Say hello to alpha3! Aside from the many bug fixes, the focus is on improving cart functionality. We've also been busy stabilizing Inline Entity Form, with dozens of commits and two new releases.

Reminder: Commerce 2.x alphas are NOT production ready. No upgrade path is provided between alphas. A full reinstall is needed each time.

Read on to find out what's new...

Bojan Zivanovic
Posted: Mar 2, 2016

Commerce 2.0 alpha2 released

The holidays are a distant memory, and Drupal 8 contrib work is happening in full force. Time for another 2.x alpha. The past three weeks have seen bug fixes, test work, and many internal cleanups. But let's focus on the bigger changes.

Reminder: Commerce 2.x alphas are NOT production ready. No upgrade path is provided between alphas, a full reinstall is needed each time.

Read on to find out what's new...

Bojan Zivanovic
Posted: Jan 22, 2016

Commerce 2.0 alpha1 released

2016 will be the year of Drupal 8 and Commerce 2.x projects.
In order to start tracking our progress towards our first productive ready release (which will be beta1), we're releasing alpha1 of Commerce 2.0.
Behind the scenes we've also created new releases of several dependencies: inline_entity_form 1.0-alpha3, profile 1.0-alpha1, and state_machine 1.0-beta1.

Download alpha1 here, then follow the installation instructions in our documentation.


Bojan Zivanovic
Posted: Dec 25, 2015

Commerce 2.x Stories: Workflows

Now that we’ve covered products, it’s time to jump into orders. We are improving many aspects of orders based on previous feedback. One such aspect is the concept of order statuses and states.

In Commerce 1.x orders have a status. The status indicates the current checkout page, whether the order is a cart, whether it has been paid and fulfilled (shipped), or maybe cancelled/refunded. Statuses are sequential, one goes after another. They are grouped by states, e.g. all checkout statuses belong to the “checkout state“.

The problem with this model is that one list of statuses indicates multiple concepts (checkout state, payment state, fulfillment state, etc). These concepts are parallel and trying to handle them sequentially creates bugs and confusion. For example, an order might be paid before or after checkout completes due to the async nature of certain payment gateways, or because the business is invoicing clients at the end of the month. Furthermore, there is no requirement for the status to change sequentially, it can be set to any other status at any point. There is no way to express rules such as “only completed orders can be refunded“ or “completed orders can’t be sent back to checkout”.

Read on to find out how we're fixing it...
Bojan Zivanovic
Posted: Dec 10, 2015

Commerce 2.x Stories: Products

Previously we talked about currencies and stores. This week we’ll focus on products.

Drupal 8 product list.

Commerce 2.x ships with much better UX out of the box, thanks to a revamped product architecture. It also features under the hood improvements that allow developers to implement custom product architectures for different use cases.

Read on...

Bojan Zivanovic
Posted: Nov 20, 2015

Commerce 2.x Stories: Currencies

Welcome back. Last week we discussed our efforts around libraries, Composer, dependent modules. This week it’s time to jump into Commerce itself. Let’s start with currencies.

The very first Commerce 2.x story discussed our efforts to replace the hardcoded Commerce 1.x currency list with one generated from an external source. It also discussed our efforts to improve currency formatting. This work resulted in the commerceguys/intl library. It contains a list all currencies in the world, as well as translated currency names and symbols for over 200 languages. This list gets updated and expanded every 6 months (according to the CLDR release schedule).

On the Commerce side, currencies are configuration entities. A price field is provided that stores amounts and their currency codes.
The field widget and formatter are locale aware and use the intl library's NumberFormatter to do the heavy lifting.

Read on for more details...

Bojan Zivanovic
Posted: Oct 29, 2015

Commerce 2.x Stories: Update

Drupal 8 is now ready for production use, with RC1 released just recently. This also means that work on D8 contrib is accelerating, and everyone is curious about when they can start their first eCommerce sites.

A production ready Commerce 2.x beta won’t happen for another two months. However, we’re ready to start releasing related modules, tag Commerce alphas, write documentation, and track our progress more publicly. Starting from today we’ll do weekly blog posts showing the current state of Commerce 2.x. And for the people who want to build the future instead of just anticipating it, we’re holding IRC meetings every wednesday at 3PM GMT+2 on #drupal-commerce.

So, what have we been up to?

Bojan Zivanovic
Posted: Oct 21, 2015

Commerce 2.x Stories: Taxes

"Why doesn’t Commerce/Magento/$otherSolution handle my taxes properly? That’s the most basic feature!” - many people, often.

When it comes to eCommerce, nobody likes taxes. We expect taxes to “just work”, so we can finish our projects and get on with our lives. At the same time, no other topic is as complex.

Selling online puts us at the crossroads of different (and sometimes conflicting) laws with many rules and even more exceptions. All eCommerce systems provide the basic tools (“Define your tax rates and specify when to apply them”) and make the site developer responsible for tax compliance. The developer usually passes that responsibility to the client, sometimes implicitly. The client consults an accountant, sometimes. But the buck has to stop somewhere, and it often comes back to the developer, 5 days after launch.

As taxes become more and more complex, there is a need for smarter tax handling, where the application does more and the site administrator less. In the Commerce 1.x lifecycle we’ve built the commerce_vat module to handle the more and more complex VAT taxes. For 2.x, we’re bringing this approach back into core, and releasing several libraries to share the solution with the wider PHP community.


Bojan Zivanovic
Posted: Nov 20, 2014


Subscribe to RSS - Commerce 2.x