You are here

public function CartSessionInterface::hasCartId in Commerce Core 8.2

Checks whether the given cart order ID exists in the session.

Parameters

int $cart_id: The cart order ID.

string $type: The cart session type.

Return value

bool TRUE if the given cart order ID exists in the session, FALSE otherwise.

1 method overrides CartSessionInterface::hasCartId()
CartSession::hasCartId in modules/cart/src/CartSession.php
Checks whether the given cart order ID exists in the session.

File

modules/cart/src/CartSessionInterface.php, line 54

Class

CartSessionInterface
Stores cart ids in the anonymous user's session.

Namespace

Drupal\commerce_cart

Code

public function hasCartId($cart_id, $type = self::ACTIVE);