'COALESCE(p.sale_price, p.price) ASC', 'price_high' => 'COALESCE(p.sale_price, p.price) DESC', 'name' => 'p.name ASC', default => 'p.created_at DESC' }; // Get total count $totalProducts = db()->count('products', $whereClause, $params); $pagination = paginate($totalProducts, $page, 12); // Get products $products = db()->fetchAll( "SELECT p.*, pt.name AS type_name, pt.type_id AS type_slug FROM products p LEFT JOIN product_types pt ON p.product_type_id = pt.type_id WHERE {$joinWhereClause} 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" ); $metaTitle = "Shop Premium Coffee Beans | Tom's Java Jive"; $metaDescription = 'Browse our selection of premium artisan coffee beans. Single origin, blends, light, medium and dark roasts. Free shipping over $50.'; $metaKeywords = 'buy coffee beans online, artisan coffee, single origin, blends, light roast, dark roast'; $canonicalUrl = 'https://tomsjavajive.com/shop.php'; require_once __DIR__ . '/includes/header.php'; $productTypesList = db()->fetchAll("SELECT type_id, name, slug FROM product_types WHERE is_active=1 ORDER BY sort_order ASC"); ?>

Our Coffee Collection

Discover your perfect brew from our selection of premium coffees

All
Sub Categories: All
$category, 'subcat' => $subcat])); $filterQs = $filterQs ? '&' . $filterQs : ''; ?>

Showing of products

No products found

Try adjusting your search or filters

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

1): ?> $category, 'sort' => $sort]))) ?>