Last active
February 6, 2019 22:13
-
-
Save init90/9a91adcad4fe868ec114f97d5b0baed0 to your computer and use it in GitHub Desktop.
Drupal 7, commerce. Get all order ids from anonymous users which have cart status.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$status_ids = array_keys(commerce_order_statuses(array('cart' => TRUE))); | |
$cart_order_ids = db_query('SELECT order_id FROM {commerce_order} WHERE uid = 0 AND status IN (:status_ids)', array( | |
':status_ids' => $status_ids, | |
))->fetchCol(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment