getPriceRangeStats(); $min_price = (int) floor((float) ($options['min_price'] ?? ($price_stats->min_price ?? 100))); $max_price = (int) ceil((float) ($options['max_price'] ?? ($price_stats->max_price ?? 5000))); // Step 1 so the range slider can reach the true max exactly. A coarser // step only lets the thumb stop on min + N*step, capping the slider // short of the real maximum when (max - min) isn't a whole multiple of // that step (e.g. min 9 / max 10000 / step 100 stops at 9909). $step = $options['step'] ?? 1; ob_start(); ?>
Price Range
Clear
-
getPublished(['order_by' => 'sorting', 'order' => 'ASC']); if (empty($difficulty_levels)) { return ''; } ob_start(); ?>
Difficulty Level
Clear
countByDifficultyLevel($level->id); ?>
Rating
Clear
5, 'label' => 'And Up'], ['stars' => 4, 'label' => 'And Up'], ['stars' => 3, 'label' => 'And Up'], ['stars' => 2, 'label' => 'And Up'], ['stars' => 1, 'label' => 'And Up'] ]; // Check if reviews table exists and get trip counts $tripRepository = new \Yatra\Repositories\TripRepository(); $reviews_table_exists = $tripRepository->reviewsTableExists(); foreach ($rating_options as $option) : // Get trip count for this rating and above $trip_count = 0; if ($reviews_table_exists) { $trip_count = $tripRepository->countByMinRating($option['stars']); } ?>
getPublished(['order_by' => 'name', 'order' => 'ASC']); if (empty($categories)) { return ''; } ob_start(); ?>
Categories
Clear
countByCategory($category->id); if ($trip_count > 0) : ?>
getPublished(['order_by' => 'name', 'order' => 'ASC', 'limit' => 15]); if (empty($destinations)) { return ''; } ob_start(); ?>
Destinations
Clear
countByDestination($destination->id); if ($trip_count > 0) : ?>
getPublished(['order_by' => 'name', 'order' => 'ASC', 'limit' => 15]); if (empty($activities)) { return ''; } ob_start(); ?>
Activities
Clear
countByActivity($activity->id); if ($trip_count > 0) : ?>