Skip to main content

Articles tagged with "automation"

How to: Implement an automated Commerce Order state transition

3rd Apr 2023

A common requirement for any website that sells products is to have a mechanism in place that ensures orders placed on the website are 'Exportable' - being made available as a file that can be sent across to a different system, to handle the processing of the order.

The Drupal Commerce 2.x module (for Drupal 9, 10) has the concept of order 'Workflows', along with defined 'States' and 'Transitions'. A workflow is a set of states and transitions that the order will go through during its lifecycle. Transitions are applied to an order and this will progress the order from...

Read more

Using Drush export content type, and views

6th Jul 2009

We're not sure what to do with these: we've written two simple Drush scripts for exporting content types and views. Saving us from having to navigate a few pages and precious seconds.

Download them and pop them somewhere Drush can find them, a good candidate would be in ~/.drush

Then you can run them by typing:

drush export view <view_name>

or

drush export content type <type_name>

You should now either have an error message or and exported view or content type in a file. The files are saved in the current working directory (in most cases where you ran drush...

Read more