public function CartProviderInterface::getCartId in Commerce Core 8.2
Gets the cart order ID for the given store and user.
Parameters
string $order_type: The order type ID.
\Drupal\commerce_store\Entity\StoreInterface|null $store: The store. If omitted, the current store is assumed.
\Drupal\Core\Session\AccountInterface|null $account: The user. If empty, the current user is assumed.
Return value
int|null The cart order ID, or NULL if none found.
1 method overrides CartProviderInterface::getCartId()
- CartProvider::getCartId in modules/
cart/ src/ CartProvider.php - Gets the cart order ID for the given store and user.
File
- modules/
cart/ src/ CartProviderInterface.php, line 76
Class
- CartProviderInterface
- Creates and loads carts for anonymous and authenticated users.
Namespace
Drupal\commerce_cartCode
public function getCartId($order_type, StoreInterface $store = NULL, AccountInterface $account = NULL);