# Hooks (/themes/sdk/reference/cart/hooks)

```ts
import { … } from '@poltura/theme-sdk/cart';
```

## `useCart` [#usecart]

The cart with its actions, usable anywhere on the storefront.

```ts
useCart(): CartState
```

Mutations run on the host; removing a line emits the remove-from-cart event and `checkout` the begin-checkout event.

**Returns:** The cart, its status and the actions that change it.

**Example**

```tsx
import { useCart } from '@poltura/theme-sdk/cart';

export function CartCount() {
  const { cart } = useCart();
  return <span>{cart?.itemCount ?? 0}</span>;
}
```

## `useCartPage` [#usecartpage]

What the cart page shows beside the cart: recommendations, the minimum order and a changed bundle price.

```ts
useCartPage(): CartPageView
```

**Returns:** The page extras; recommendations are empty outside the cart page.

**Example**

```tsx
import { MinimumOrderNotice, useCartPage } from '@poltura/theme-sdk/cart';

export function CartMinimum() {
  const { minimumOrder } = useCartPage();
  return minimumOrder === null ? null : <MinimumOrderNotice minimum={minimumOrder} />;
}
```
