> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fusioncore.us/llms.txt
> Use this file to discover all available pages before exploring further.

# The Cart

> Place the Cart Indicator and the Cart page, and how the cart behaves — the drawer, quantity limits, subscription lines, and where a shopper's cart is stored.

## Overview

The Store's cart has three faces, and two of them are the same component:

* The **Cart Indicator** — the cart icon and item count, usually in the site header.
* The **cart drawer** — a slide-in panel over the current page, for a quick look and edit.
* The **Cart page** — the full-page cart, where a shopper reviews everything and continues to payment.

The drawer and the page are both **FS Portal - Cart** (`fsPortalStoreCart`); the drawer opens over whatever page the shopper is on, while the page is the component placed on your Cart page.

## Prerequisites

* A [Store Settings](https://docs.fusioncore.us/end-user-guides/portal/store/setting-up-store-settings.md) record with **Cart Page URL** and **Checkout Page URL** set.
* **Show Cart As** decided — `Drawer` or `Page`.

## Place the Components

**1. Add the Cart Indicator to your header**

Drag **FS Portal - Store Cart Indicator** into your site header, or onto each page that needs it. Its only property is **Store Settings** (`storeSettingsName`), which it reads for **Show Cart As** and **Cart Page URL**.

**2. Create the Cart page**

Create a page at the path you set in **Cart Page URL** (for example `/cart`) and drag **FS Portal - Cart** onto it.

| Property | Default value | What it does |
| - | - | - |
| **Hide Checkout Button** (`hideCheckout`) | `false` | Hides the checkout action. This also hides the step indicator and the guest identity section, turning the page into a read-only cart review |
| **Hide Back Link** (`hideBackLink`) | `false` | Hides the back-to-shop link |
| **Store Settings** (`storeSettingsName`) | `Default` | The Store Settings record this cart uses |

**3. Publish**

Click **Publish**. The drawer needs no placement of its own — the Cart Indicator opens it when **Show Cart As** is `Drawer`.

## The Cart Indicator

| **Behavior** | **Detail** |
| - | - |
| Item count | A badge on the icon, updating live as items are added or removed |
| Empty cart | No badge at all |
| Large carts | The badge caps at `99+` |
| On click | Opens the drawer, or goes to the Cart page — whichever **Show Cart As** specifies |
| On page load | Reflects the shopper's persisted cart, so the count survives navigation and reloads |

## The Cart Drawer

The drawer lists the cart's lines with a subtotal and, where it applies, estimated tax. **Checkout** takes the shopper to the Cart page rather than straight to payment, so they get the full review either way. An empty drawer shows an empty state with a link to browse the Store.

## Cart Lines

Lines render differently by product type.

| Line type | Shows |
| - | - |
| Standard product | Image, name, price, and a quantity control |
| Subscription | Image, name, the **subscription plan**, the term's renews-on or ends date, and an **Auto Renew** toggle |

Two details follow from **Max Quantity Per Item** on the product:

* A product limited to one unit per line shows a **remove** button instead of a quantity stepper.
* A product with a higher limit adds in sets of that size. Raising the quantity past the limit creates a further line, and the cart tells the shopper it adds in sets.

> [!NOTE]
>
> Members see **Your Price** with the list price struck through where they qualify for a better price. Guests see the list price alone, because member pricing depends on who they are.

## Where the Cart Is Stored

| | Logged-in member | Guest |
| - | - | - |
| Storage | A single **Order** in `Open` status, reused across visits | The browser's local storage |
| Salesforce records | Order and Order Products, updated as they edit | None until they continue from the Cart page |
| After a reload or re-login | Cart reloads from the same Open Order | Cart reloads from local storage, same browser only |
| Adding items again later | Reuses the existing Open Order — no duplicates | Adds to the same local cart |

> [!WARNING]
>
> A guest's cart lives only in that browser. Clearing site data, switching device, or using a private window loses it. Nothing is recoverable, because nothing was ever saved in Salesforce.

## The Cart Page

The Cart page shows a two-step indicator — **Review Cart**, then **Confirmation** — where Confirmation is the payment page the shopper moves on to. Below the lines and totals sit the actions: **Continue**, with a **Continue Shopping** link beside it.

For a **logged-in member**, **Continue** goes straight to the Checkout page with their order.

For a **guest**, the page first asks how they want to proceed:

| Choice | Effect |
| - | - |
| **Continue as Guest** | Buy without an account. Shown only when **Continue as Guest User** is enabled in Store Settings |
| **Login / Create an account** | Sign in or register first, then come back and buy as a member |

Choosing **Login / Create an account** takes the shopper to the page set in **Login Page URL**. The items they already added travel with them, so after signing in they pick up where they left off with the cart intact.

If your Store Settings enables **Validate reCAPTCHA For Guests**, a guest who chose **Continue as Guest** must pass a reCAPTCHA challenge before **Continue** proceeds. See [Guest Checkout](https://docs.fusioncore.us/end-user-guides/portal/store/guest-checkout.md).

## Limitations and Common Pitfalls with Cart

* **A guest's cart is browser-local.** It cannot be recovered from Salesforce, because it was never there.
* **Switching currency clears the cart.** The shopper is warned first. Prices and availability both depend on currency, so the cart cannot survive the switch.
* **Hiding the checkout button hides more than the button.** The step indicator and the guest identity section go with it, leaving a read-only cart.
* **The drawer's Checkout button goes to the Cart page, not to payment.** That is intentional — the review step is where a guest identifies themselves.
* **Lowering a product's Max Quantity Per Item does not fix existing carts.** A line already over the new limit splits when the shopper next changes its quantity, not retroactively.
* **A member has exactly one Store cart.** It is a single Open Order per contact, so a cart started on one device is the cart they see on another.
* **An unset Checkout Page URL surfaces only at the end.** The shopper can browse, add, and review, then get an error on **Continue**. Set it when you create the Store Settings record.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.