Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JAQA20/LaComanda/llms.txt

Use this file to discover all available pages before exploring further.

Products are managed from views/admin/productos.php, which lists every item in the catalog alongside its category, price, icon, and active status. Administrators can create new products, update existing ones, and control visibility in the waiter’s order interface by toggling the activo flag. Product routing to the kitchen or barista queue is determined entirely by the category a product belongs to — choosing the right category is essential for correct order flow.

Product Fields

FieldTypeDescription
categoria_idintegerRequired. Links the product to a category. This determines whether orders for this product route to the kitchen or the barista queue.
nombrestring (max 120)Required, unique within category. The display name shown in the waiter’s interface and on order tickets.
preciodecimal(10,2)Required. Unit price in local currency, used to calculate order totals.
iconostringFontAwesome icon class displayed alongside the product (e.g. fa-mug-hot, fa-bread-slice). Defaults to fa-mug-hot if left blank.
activobooleanDefault 1. Inactive products are hidden from the order-taking interface but remain in the database.

Creating a Product

New products are created through the form at views/admin/nuevoProducto.php, which submits to:
POST /public/api/nuevoProducto.php
The category is selected from a dropdown populated with active categories only. If the desired category is inactive, it must be re-activated before the product can be assigned to it. Submitting a product name that already exists within the same category is rejected — names must be unique per category, though the same name may appear in different categories.

Editing a Product

Existing products are updated via the form at views/admin/editarProducto.php, which submits to:
POST /public/api/editarProducto.php
All fields can be updated, including categoria_id. Changing the categoria_id immediately changes the routing for that product — if moved from a kitchen category to a barista category (e.g. cafes or bebidas), future orders for that product will appear in the barista queue instead of the kitchen queue.

Deleting a Product

To permanently remove a product, submit:
POST /public/api/eliminarProducto.php
ParameterDescription
idThe ID of the product to delete
Products that are referenced in existing detalle_orden records are protected by a foreign key constraint and cannot be deleted until those order detail records are cleared. If a product needs to be retired while historical orders still reference it, use the activo=0 toggle instead of deletion.

Active/Inactive Toggle

Setting a product’s activo flag to 0 removes it from the waiter’s order interface without deleting it. Inactive products are excluded from:
GET /public/api/listarProductos.php
This means they will not appear in any category list shown to waiters, effectively preventing new orders from being placed for that item. Reactivating the product (setting activo=1) instantly restores its visibility. This is the recommended approach for temporarily removing seasonal or out-of-stock items.

Default Product Catalog

La Comanda ships with 60 seeded products spread evenly across 6 categories:
CategoryCountExample Products
Cafés10Espresso, Capuccino, Latte, Americano, Macchiato
Comidas10Sandwich de Pollo, Panini Toscana, Club Sándwich
Especialidades10Frappé Caramelo, Matcha Latte, Chai Latte
Postres10Cheesecake, Tiramisú, Brownie, Croissant
Bebidas Frías10Iced Latte, Smoothie de Fresa, Limonada
Product routing (kitchen vs barista) is determined by the product’s category slug, not by the product itself. Changing a product’s category changes where its orders appear in the preparation queues.

Build docs developers (and LLMs) love