SQL templates/PrestaShop

Abandoned carts in PrestaShop

Find PrestaShop carts that were created but never converted into an order.

PrestaShop · PostgreSQL
SELECT ca.id_cart,
       ca.id_customer,
       ca.date_add AS cart_created,
       ca.date_upd AS last_activity
FROM ps_cart ca
LEFT JOIN ps_orders o ON o.id_cart = ca.id_cart
WHERE o.id_order IS NULL
  AND ca.date_add >= NOW() - INTERVAL '14 days'
ORDER BY ca.date_upd DESC
LIMIT 100;

How it works

Selects carts with no matching valid order — the classic abandoned-cart segment for remarketing.

Run this on your own database

BeQuery mirrors your PrestaShop MySQL database to an isolated PostgreSQL copy, so you can run queries like this one without ever touching production.

Start free No credit card