public function CommerceCartProviderSession::cartOrderIds in Commerce Core 7
Returns an array of cart order IDs stored.
Parameters
$completed: Boolean indicating whether or not the operation should retrieve the completed orders array instead of the active cart orders array.
Return value
An array of applicable cart order IDs or an empty array if none exist.
Overrides CommerceCartProviderInterface::cartOrderIds
File
- modules/
cart/ plugins/ cart_provider/ CommerceCartProviderSession.class.php, line 46
Class
- CommerceCartProviderSession
- Defines a session array based cart provider.
Code
public function cartOrderIds($completed = FALSE) {
$key = $completed ? self::COMPLETED : self::CART;
return empty($_SESSION[$key]) ? array() : $_SESSION[$key];
}