query("SELECT COUNT(*) FROM products"); $total_products = $stmt->fetchColumn(); // 2. Total Categories $stmt = $pdo->query("SELECT COUNT(*) FROM categories"); $total_categories = $stmt->fetchColumn(); // 3. Total Orders $stmt = $pdo->query("SELECT COUNT(*) FROM orders"); $total_orders = $stmt->fetchColumn(); // 4. Total Sales $stmt = $pdo->query("SELECT SUM(total_amount) FROM orders WHERE status != 'cancelled'"); $total_sales = $stmt->fetchColumn() ?: 0.00; // 5. Recent Orders $stmt = $pdo->query("SELECT o.*, u.full_name FROM orders o LEFT JOIN users u ON o.user_id = u.id ORDER BY o.id DESC LIMIT 5"); $recent_orders = $stmt->fetchAll(); } catch (Exception $e) { $total_products = 0; $total_categories = 0; $total_orders = 0; $total_sales = 0; $recent_orders = []; } ?>

Welcome Back,

Atelier Desk • Live Platform Overview •

Gross Revenue

LKR

Total Orders

Catalog Products

Catalog Categories

Recent Platform Orders

No purchases have been recorded yet.
Order Ref Patron Method Fulfillment Amount
#MNDIRECT- LKR

Catalog Shortcuts

Select any action below to quickly add new luxury assets or refine existings.