SQL templates/PrestaShop

Low-stock products in PrestaShop

Surface PrestaShop products at or below a stock threshold so you can reorder.

PrestaShop · PostgreSQL
SELECT pl.name AS product,
       sa.quantity AS in_stock
FROM ps_stock_available sa
JOIN ps_product_lang pl
  ON sa.id_product = pl.id_product AND pl.id_lang = 1
WHERE sa.quantity <= 5
ORDER BY sa.quantity ASC
LIMIT 100;

How it works

Reads the stock_available table and flags items with quantity at or under 5. Adjust the threshold to your reorder point.

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