'COALESCE(sale_price, price) ASC', 'price_high' => 'COALESCE(sale_price, price) DESC', 'name' => 'name ASC', default => 'created_at DESC' }; // Get total count $totalProducts = db()->count('products', $whereClause, $params); $pagination = paginate($totalProducts, $page, 12); // Get products $products = db()->fetchAll( "SELECT * FROM products WHERE {$whereClause} ORDER BY {$orderBy} LIMIT :limit OFFSET :offset", array_merge($params, ['limit' => $pagination['per_page'], 'offset' => $pagination['offset']]) ); // Get categories for filter $categories = db()->fetchAll( "SELECT DISTINCT category FROM products WHERE category IS NOT NULL AND category != '' AND is_active = 1 ORDER BY category" ); require_once __DIR__ . '/includes/header.php'; ?>

Our Coffee Collection

Discover your perfect brew from our selection of premium coffees

All

Showing of products

No products found

Try adjusting your search or filters

View All Products
<?= htmlspecialchars($product['name']) ?> Sale Featured

1): ?>