# The PrestaShop cart empties itself

> A customer adds items to their cart, comes back an hour or a day later, and finds it empty. This is almost never a random bug: the PrestaShop cart is tied to a cookie and a session, and that link breaks for specific reasons — a lost cookie, an over-eager cache, or a discount or stock level that changed in the meantime.

- Source canonique : [https://allaux.fr/en/prestashop/problemes/panier-se-vide-tout-seul](https://allaux.fr/en/prestashop/problemes/panier-se-vide-tout-seul)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## Direct answer

> Find the customer’s row in ps_cart: if the id and its products are still there, the cart never disappeared — the cookie simply no longer points to it. Check the domain declared under Shop Parameters > Traffic & SEO and the consent banner, then exclude the cart page from any full-page cache or CDN sitting in front of the shop.

## How PrestaShop keeps track of a cart

The cart isn’t stored in the browser: it’s saved in the database under a unique identifier (id_cart), linked to a cookie set on the customer’s device. As long as that cookie exists and remains valid, PrestaShop finds the cart again on every visit. Seeing it empty "on its own" almost always means this link between the browser and the database record has broken, not that the order itself has vanished.

The most common causes: a cookie blocked by the browser or by a badly configured consent banner, a cookie cleared manually between visits, or a cookie setting (domain, SameSite) still pointing at an old address after a URL or certificate change. In all these cases the cart data still exists in the database; PrestaShop simply no longer knows which visitor it belongs to.

## A page cache can look the same

If a full-page cache module or a proxy in front of PrestaShop (CDN, server cache) serves the same cart page to every visitor, each one can see an empty cart even though their order genuinely exists in the database. It isn’t the cart that’s empty, it’s the page that’s frozen. The cart page should never be part of a full-page cache.

## Two other causes worth checking

- A cart rule that expires while the customer is still deciding: on their return, PrestaShop recalculates the cart and the discount disappears, which can look like the cart has emptied.
- An item that goes out of stock in the meantime: depending on the stock management setting, PrestaShop can remove it from the cart automatically when the customer comes back.

## Configuration or development?

Checking cookie settings, excluding the cart page from an over-eager cache, or adjusting how long a cart rule lasts is configuration work, usually quick to pin down. It becomes development when the shop needs bespoke session handling — a cart shared across multiple domains, cart recovery after a very long delay, or fine compatibility with a third-party cache module already in place.

## Related pages

- **The "Add to cart" button doesn’t respond** — A different symptom: here it’s the click that does nothing, not the cart contents disappearing afterwards. ([/prestashop/problemes/bouton-ajouter-panier-ne-fonctionne-pas](/prestashop/problemes/bouton-ajouter-panier-ne-fonctionne-pas))
- **Stock isn’t updating correctly** — The difference between physical stock and reserved stock, a confusion that also affects cart contents. ([/prestashop/problemes/gestion-stocks-mise-a-jour](/prestashop/problemes/gestion-stocks-mise-a-jour))
- **PrestaShop shop loading slowly** — When a badly configured cache slows down the whole site, not just the cart page. ([/prestashop/boutique-lente](/prestashop/boutique-lente))

## FAQ

### The cart empties on PrestaShop 1.6 — is that different on 1.7 or 8?

The principle — cookie and id_cart in the database — is the same across every version. What changes are the cache settings and default modules, which differ from one version to another.

### Why do I get a 500 error when the cart is empty?

That’s a distinct symptom from lost contents: a 500 error on an empty cart page usually comes from a module hooked into the cart display that fails when there are no items, not from a cookie problem.

### Can a cache module really empty my customers’ carts?

It doesn’t actually empty it, but it can display a frozen page that looks that way. The cart page should always be excluded from full-page caching.

### How can I tell if the problem is my browser or the site?

I test with several browsers and in private browsing, without any cookie-blocking extension. If the cart still empties under those conditions, the cause is server-side, not browser-side.

### Does this always need development work?

No: most cases are fixed with a cookie, cache or cart rule setting. Development is needed mainly for specific requirements, such as a cart shared across multiple domains.
