function commerce_cart_order_session_save in Commerce Core 7
Saves an order ID to the appropriate cart orders session variable.
Parameters
$order_id: The order ID to save to the array.
$completed: Boolean indicating whether or not the operation should save to the completed orders array instead of the active cart orders array.
2 calls to commerce_cart_order_session_save()
- commerce_cart_commerce_checkout_complete in modules/
cart/ commerce_cart.module - Implements hook_commerce_checkout_complete().
- commerce_cart_order_new in modules/
cart/ commerce_cart.module - Creates a new shopping cart order for the specified user.
File
- modules/
cart/ commerce_cart.module, line 1241 - Implements the shopping cart system and add to cart features.
Code
function commerce_cart_order_session_save($order_id, $completed = FALSE) {
if ($cart_provider = commerce_cart_get_provider()) {
$cart_provider
->cartSave($order_id, $completed);
}
}