A Guide to Automate the Transition of a Commerce Order

DrupalCon Europe 2021

ComputerMinds has published a new article on an important issue for e-commerce sites based on Drupal. The article is authored by an experienced developer, Ross Bale. Ross puts forth a step-by-step guide that helps a developer to get a commerce order to transition to an ‘exported’ state automatically after it’s been paid for.

An Exportable order is a common requirement for any website that sells products. It means the orders placed on the website are made available as a transferable file. It helps the order be sent to a different system for processing.

The Drupal Commerce 2.x module (for Drupal 9, 10) has a similar concept in place. It comes with the order ‘Workflows’ and defined ‘States’ and ‘Transitions.’ A workflow is a set of states and transitions the order will go through during its lifecycle. When transitions are applied to an order, it will take the order from one state to another.

A few workflows are provided for the sites by default. Developers usually have to build their workflows to address the specific needs of each site. More details about creating a custom workflow can be found in the documentation published on drupalcommerce.org.

The default workflow does not have the ability to automatically transition to a separate state once the payment is made. Ross’ article takes us through the steps to achieve this functionality.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Related People

Related Organizations

Advertisement Here

Upcoming Events

Latest Opportunities

Advertisement Here