PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.14.2
Yatra – Travel Booking & Tour Operator Software v3.0.14.2
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
yatra / templates / listing-trip.php

listing-trip.php in Yatra – Travel Booking & Tour Operator Software 3.0.14.2, at templates/listing-trip.php

880 lines 58.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Trip listing template (presentation). Data is prepared in {@see TripListingPageContextFactory} and set by {@see ListingPageHandler}.
4 *
5 * @package Yatra
6 */
7
8 use Yatra\Services\TripListingService;
9
10 if (!defined('ABSPATH')) {
11 exit;
12 }
13
14 $tripListingService = new TripListingService();
15
16 $ctx = $GLOBALS['yatra_trip_listing_context'] ?? [];
17 $filter_data = $ctx['filter_data'] ?? [];
18 if ($filter_data === []) {
19 $filter_data = $tripListingService->getFilterData();
20 }
21 $yatra_trip_list = $ctx['trip_list'] ?? ($GLOBALS['yatra_trip_list'] ?? null);
22 $trips_source = $ctx['trips'] ?? [];
23 $trip_total = (int) ($ctx['total'] ?? 0);
24 $trip_total_pages = (int) ($ctx['pages'] ?? 1);
25 $trip_current_page = (int) ($ctx['current_page'] ?? 1);
26 $trip_dest_options = $ctx['destinations'] ?? [];
27 $trip_act_options = $ctx['activities'] ?? [];
28 $active_filters = $ctx['active_filters'] ?? [];
29 $yatra_listing_title = $ctx['listing_title'] ?? __('All Trips', 'yatra');
30 $current_filter_type = $ctx['taxonomy_type'] ?? '';
31 $current_filter_slug = $ctx['taxonomy_slug'] ?? '';
32 $current_filter_name = $ctx['taxonomy_name'] ?? '';
33 $yatra_results = $ctx['results'] ?? [
34 'display_total' => 0,
35 'start_item' => 0,
36 'end_item' => 0,
37 'per_page' => yatra_get_posts_per_page(),
38 ];
39 $yatra_pagination = $ctx['pagination'] ?? [
40 'total_pages' => 1,
41 'current_page' => 1,
42 'prev_url' => null,
43 'next_url' => null,
44 'items' => [],
45 ];
46 $yatra_sort_options = $ctx['sort_options'] ?? [];
47 $show_taxonomy_context = !empty($ctx['show_taxonomy_context']);
48
49 yatra_get_header();
50 ?>
51
52 <?php if ($show_taxonomy_context) : ?>
53 <div id="yatra-trip-context"
54 data-type="<?php echo esc_attr($current_filter_type); ?>"
55 data-slug="<?php echo esc_attr($current_filter_slug); ?>"
56 data-name="<?php echo esc_attr($current_filter_name); ?>"
57 style="display:none;"></div>
58 <?php endif; ?>
59
60 <div class="yatra-listing-page yatra-trip-listing" id="yatra-trip-listing-root">
61 <!-- Trip Search Shortcode - replaces hardcoded search UI -->
62 <div class="yatra-trip-listing-search-wrap">
63 <?php
64 // Build the [yatra_search] arguments from the Search & Listing toggles so
65 // the listing bar reflects the operator's settings explicitly at the call
66 // site. Each field becomes a yes/no argument the shortcode honours, so
67 // turning a field off in Settings → Search & Listing hides it here.
68 $yatra_search_field_settings = [
69 'keyword' => 'search_show_keyword',
70 'destination' => 'search_show_destination',
71 'activities' => 'search_show_activities',
72 'duration' => 'search_show_duration',
73 'budget' => 'search_show_budget',
74 ];
75 $yatra_search_atts = '';
76 foreach ($yatra_search_field_settings as $yatra_arg => $yatra_setting_key) {
77 $yatra_search_atts .= sprintf(
78 ' %s="%s"',
79 $yatra_arg,
80 \Yatra\Services\SettingsService::isEnabled($yatra_setting_key) ? 'yes' : 'no'
81 );
82 }
83 echo do_shortcode('[yatra_search' . $yatra_search_atts . ']');
84 ?>
85 </div>
86
87 <div class="yatra-listing-wrapper yatra-listing-wrapper--overlay-host">
88 <div id="yatra-listing-loading-overlay" class="yatra-listing-loading-overlay" aria-hidden="true" role="status">
89 <div class="yatra-listing-loading-card">
90 <span class="yatra-listing-loading-spinner" aria-hidden="true"></span>
91 <p class="yatra-listing-loading-text"><?php esc_html_e('Updating trips…', 'yatra'); ?></p>
92 </div>
93 </div>
94 <div class="yatra-listing-container">
95
96 <!-- Results Header -->
97 <div class="yatra-results-header">
98 <div class="yatra-results-info">
99 <h1><?php echo esc_html($yatra_listing_title); ?></h1>
100 <?php if (empty($show_taxonomy_context)) : ?>
101 <p class="yatra-listing-archive-lede"><?php esc_html_e('Compare trips, filter by budget and trip style, then open a trip for full details and booking.', 'yatra'); ?></p>
102 <?php elseif (!empty($current_filter_name) || !empty($current_filter_slug)) : ?>
103 <p class="yatra-listing-archive-lede"><?php
104 printf(
105 /* translators: %s: applied taxonomy filter label (destination, activity, or category name). */
106 esc_html__('Filtered by: %s', 'yatra'),
107 esc_html($current_filter_name !== '' ? $current_filter_name : (string) $current_filter_slug)
108 );
109 ?></p>
110 <?php endif; ?>
111 <p class="yatra-results-count">
112 <?php
113 if ($yatra_results['display_total'] > 0) {
114 echo sprintf(
115 /* translators: 1: first item index on the page, 2: last item index on the page, 3: total trips, 4: current page number, 5: total page count. */
116 __('Showing <strong>%1$d-%2$d</strong> of %3$d trips (Page %4$d of %5$d)', 'yatra'),
117 (int) $yatra_results['start_item'],
118 (int) $yatra_results['end_item'],
119 (int) $yatra_results['display_total'],
120 $trip_current_page,
121 $trip_total_pages
122 );
123 } else {
124 echo esc_html__('No trips found', 'yatra');
125 }
126 ?>
127 </p>
128 </div>
129 <div class="yatra-results-controls">
130 <div class="yatra-sort-control">
131 <label><?php esc_html_e('Sort by:', 'yatra'); ?></label>
132 <?php
133 ?>
134 <select id="yatra-sort-filter" class="yatra-sort-filter-select">
135 <?php foreach ($yatra_sort_options as $sort_opt) : ?>
136 <option value="<?php echo esc_attr(esc_url($sort_opt['url'])); ?>"<?php echo !empty($sort_opt['selected']) ? ' selected="selected"' : ''; ?>>
137 <?php echo esc_html($sort_opt['label']); ?>
138 </option>
139 <?php endforeach; ?>
140 </select>
141 </div>
142 <div class="yatra-view-toggle">
143 <button class="yatra-view-btn active" data-view="grid" title="<?php esc_attr_e('Grid View', 'yatra'); ?>">
144 <svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
145 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"/>
146 </svg>
147 </button>
148 <button class="yatra-view-btn" data-view="list" title="<?php esc_attr_e('List View', 'yatra'); ?>">
149 <svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
150 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
151 </svg>
152 </button>
153 </div>
154 </div>
155 </div>
156
157 <div class="yatra-listing-layout">
158 <!-- Filter Sidebar - Comprehensive Filters -->
159 <aside class="yatra-filter-sidebar"<?php echo \Yatra\Services\SettingsService::isEnabled('collapse_filters_on_mobile') ? ' data-yatra-collapse-mobile="1"' : ''; ?>>
160 <div class="yatra-filter-header">
161 <h2><?php esc_html_e('Filters', 'yatra'); ?></h2>
162 <button type="button" class="yatra-clear-filters"><?php esc_html_e('Clear all', 'yatra'); ?></button>
163 </div>
164
165 <!-- Price Range -->
166 <?php
167 $price_stats = $filter_data['price_stats'] ?? $tripListingService->getPriceStats();
168
169 $min_price = $price_stats ? (int) floor($price_stats->min_price) : 0;
170 $max_price = $price_stats ? (int) ceil($price_stats->max_price) : 10000;
171 // Step 1 so the range slider can land EXACTLY on the true
172 // maximum price. A larger "dynamic" step (max/100) only lets
173 // the thumb stop on min + N*step, so unless (max - min) is a
174 // whole multiple of that step the slider caps short of the
175 // real max — e.g. min 9 / max 10000 / step 100 stops at
176 // 9909, hiding the most expensive trips from the filter.
177 // An integer step also keeps submitted price bounds whole.
178 $step = 1;
179 ?>
180 <div class="yatra-filter-section">
181 <div class="yatra-filter-title" data-toggle="price">
182 <div class="yatra-filter-title-content">
183 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
184 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"/>
185 </svg>
186 <span><?php esc_html_e('Price Range', 'yatra'); ?></span>
187 </div>
188 <div class="yatra-filter-actions">
189 <span class="yatra-clear-section" data-section="price" title="<?php esc_attr_e('Clear price filters', 'yatra'); ?>">
190 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
191 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
192 </svg>
193 </span>
194 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
195 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
196 </svg>
197 </div>
198 </div>
199 <div class="yatra-filter-content">
200 <div class="yatra-price-range">
201 <div class="yatra-price-inputs">
202 <div class="yatra-price-input-group">
203 <label class="yatra-price-input-label"><?php esc_html_e('Min Price', 'yatra'); ?></label>
204 <input type="number" name="price_min" placeholder="<?php echo $min_price; ?>" min="<?php echo $min_price; ?>" max="<?php echo $max_price; ?>" value="<?php echo !empty($active_filters['price_min']) ? esc_attr($active_filters['price_min']) : ''; ?>" id="priceMin">
205 </div>
206 <div class="yatra-price-separator">—</div>
207 <div class="yatra-price-input-group">
208 <label class="yatra-price-input-label"><?php esc_html_e('Max Price', 'yatra'); ?></label>
209 <input type="number" name="price_max" placeholder="<?php echo $max_price; ?>" min="<?php echo $min_price; ?>" max="<?php echo $max_price; ?>" value="<?php echo !empty($active_filters['price_max']) ? esc_attr($active_filters['price_max']) : ''; ?>" id="priceMax">
210 </div>
211 </div>
212 <div class="yatra-price-slider">
213 <div class="yatra-price-slider-track" aria-hidden="true"></div>
214 <div class="yatra-price-slider-range" aria-hidden="true"></div>
215 <input type="range" min="<?php echo $min_price; ?>" max="<?php echo $max_price; ?>" step="<?php echo $step; ?>" value="<?php echo !empty($active_filters['price_min']) ? esc_attr($active_filters['price_min']) : $min_price; ?>" class="yatra-range-min" id="priceRangeMin" data-default="<?php echo $min_price; ?>" data-user-set="<?php echo !empty($active_filters['price_min']) ? 'true' : 'false'; ?>">
216 <input type="range" min="<?php echo $min_price; ?>" max="<?php echo $max_price; ?>" step="<?php echo $step; ?>" value="<?php echo !empty($active_filters['price_max']) ? esc_attr($active_filters['price_max']) : $max_price; ?>" class="yatra-range-max" id="priceRangeMax" data-default="<?php echo $max_price; ?>" data-user-set="<?php echo !empty($active_filters['price_max']) ? 'true' : 'false'; ?>">
217 </div>
218 <div class="yatra-price-display"><?php echo yatra_format_price($min_price); ?> - <?php echo yatra_format_price($max_price); ?></div>
219 </div>
220 </div>
221 </div>
222
223 <!-- Trip Type Filter -->
224 <div class="yatra-filter-section">
225 <div class="yatra-filter-title" data-toggle="trip-type">
226 <div class="yatra-filter-title-content">
227 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
228 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
229 </svg>
230 <span><?php esc_html_e('Trip Type', 'yatra'); ?></span>
231 </div>
232 <div class="yatra-filter-actions">
233 <span class="yatra-clear-section" data-section="trip-type" title="<?php esc_attr_e('Clear trip type filter', 'yatra'); ?>">
234 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
235 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
236 </svg>
237 </span>
238 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
239 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
240 </svg>
241 </div>
242 </div>
243 <div class="yatra-filter-content">
244 <div class="yatra-checkbox-group">
245 <?php
246 // Get trip type options from service
247 $trip_type_options = $filter_data['trip_types'] ?? [];
248
249 foreach ($trip_type_options as $type_option) :
250 ?>
251 <label class="yatra-checkbox-label">
252 <input type="radio" name="trip_type" value="<?php echo esc_attr($type_option->value); ?>" <?php echo ($active_filters['trip_type'] === $type_option->value) ? 'checked' : ''; ?>>
253 <span><?php echo esc_html($type_option->label); ?></span>
254 <span class="yatra-filter-count">(<?php echo (int)$type_option->count; ?>)</span>
255 </label>
256 <?php endforeach; ?>
257
258 <!-- All Types Option -->
259 <label class="yatra-checkbox-label">
260 <input type="radio" name="trip_type" value="" <?php echo empty($active_filters['trip_type']) ? 'checked' : ''; ?>>
261 <span><?php esc_html_e('All Types', 'yatra'); ?></span>
262 </label>
263 </div>
264 </div>
265 </div>
266
267 <!-- Difficulty Level -->
268 <?php
269 $difficulty_levels = $filter_data['difficulty_levels'] ?? [];
270 if (!empty($difficulty_levels)) :
271 ?>
272 <div class="yatra-filter-section">
273 <div class="yatra-filter-title" data-toggle="difficulty">
274 <div class="yatra-filter-title-content">
275 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
276 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"/>
277 </svg>
278 <span><?php esc_html_e('Difficulty Level', 'yatra'); ?></span>
279 </div>
280 <div class="yatra-filter-actions">
281 <span class="yatra-clear-section" data-section="difficulty" title="<?php esc_attr_e('Clear difficulty filters', 'yatra'); ?>">
282 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
283 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
284 </svg>
285 </span>
286 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
287 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
288 </svg>
289 </div>
290 </div>
291 <div class="yatra-filter-content">
292 <?php
293 $yatra_sidebar_cb_rows = [];
294 foreach ($difficulty_levels as $level) {
295 $yatra_sidebar_cb_rows[] = [
296 'value' => $level->id,
297 'label' => $level->name,
298 'count' => (int) $level->count,
299 ];
300 }
301 $yatra_sidebar_cb_input_name = 'difficulty[]';
302 $yatra_sidebar_cb_active = $active_filters['difficulty'] ?? [];
303 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
304 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
305 ?>
306 </div>
307 </div>
308 <?php endif; ?>
309
310 <!-- Rating -->
311 <div class="yatra-filter-section">
312 <div class="yatra-filter-title" data-toggle="rating">
313 <div class="yatra-filter-title-content">
314 <svg class="yatra-filter-icon" width="18" height="18" fill="#fbbf24" viewBox="0 0 24 24">
315 <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
316 </svg>
317 <span><?php esc_html_e('Rating', 'yatra'); ?></span>
318 </div>
319 <div class="yatra-filter-actions">
320 <span class="yatra-clear-section" data-section="rating" title="<?php esc_attr_e('Clear rating filters', 'yatra'); ?>">
321 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
322 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
323 </svg>
324 </span>
325 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
326 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
327 </svg>
328 </div>
329 </div>
330 <div class="yatra-filter-content">
331 <div class="yatra-rating-filter">
332 <?php
333 $rating_options = $filter_data['ratings'] ?? [];
334
335 foreach ($rating_options as $option) :
336 // Show all rating options, even with 0 count for better UX
337 ?>
338 <label class="yatra-rating-option">
339 <input type="checkbox" name="rating[]" value="<?php echo esc_attr($option->rating); ?>" <?php echo in_array($option->rating, $active_filters['rating'] ?? []) ? 'checked' : ''; ?>>
340 <div class="yatra-stars-display">
341 <?php for ($i = 1; $i <= 5; $i++) : ?>
342 <svg class="yatra-star <?php echo $i <= $option->rating ? 'filled' : 'empty'; ?>" width="16" height="16" viewBox="0 0 24 24">
343 <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill="<?php echo $i <= $option->rating ? '#fbbf24' : '#e5e7eb'; ?>"/>
344 </svg>
345 <?php endfor; ?>
346 <span class="yatra-rating-label"><?php echo esc_html($option->label); ?></span>
347 <span class="yatra-filter-count">(<?php echo (int)$option->count; ?>)</span>
348 </div>
349 </label>
350 <?php endforeach; ?>
351 </div>
352 </div>
353 </div>
354
355 <!-- Trip Categories -->
356 <?php
357 $categories = $filter_data['categories'] ?? [];
358 if (!empty($categories)) :
359 ?>
360 <div class="yatra-filter-section">
361 <div class="yatra-filter-title" data-toggle="categories">
362 <div class="yatra-filter-title-content">
363 <svg class="yatra-filter-icon" width="18" height="18" fill="currentColor" viewBox="0 0 20 20">
364 <path fill-rule="evenodd" d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z" clip-rule="evenodd" />
365 </svg>
366 <span><?php esc_html_e('Categories', 'yatra'); ?></span>
367 </div>
368 <div class="yatra-filter-actions">
369 <span class="yatra-clear-section" data-section="categories" title="<?php esc_attr_e('Clear category filters', 'yatra'); ?>">
370 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
371 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
372 </svg>
373 </span>
374 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
375 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
376 </svg>
377 </div>
378 </div>
379 <div class="yatra-filter-content">
380 <?php
381 $yatra_sidebar_cb_rows = [];
382 foreach ($categories as $category) {
383 $yatra_sidebar_cb_rows[] = [
384 'value' => $category->id,
385 'label' => $category->name,
386 'count' => (int) $category->count,
387 ];
388 }
389 $yatra_sidebar_cb_input_name = 'categories[]';
390 $yatra_sidebar_cb_active = $active_filters['categories'] ?? [];
391 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
392 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
393 ?>
394 </div>
395 </div>
396 <?php endif; ?>
397
398 <!-- Destinations -->
399 <?php
400 $destinations = $filter_data['destinations'] ?? [];
401 if (!empty($destinations)) :
402 ?>
403 <div class="yatra-filter-section">
404 <div class="yatra-filter-title" data-toggle="destinations">
405 <div class="yatra-filter-title-content">
406 <svg class="yatra-filter-icon" width="18" height="18" fill="currentColor" viewBox="0 0 20 20">
407 <path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd" />
408 </svg>
409 <span><?php esc_html_e('Destinations', 'yatra'); ?></span>
410 </div>
411 <div class="yatra-filter-actions">
412 <span class="yatra-clear-section" data-section="destinations" title="<?php esc_attr_e('Clear destination filters', 'yatra'); ?>">
413 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
414 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
415 </svg>
416 </span>
417 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
418 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
419 </svg>
420 </div>
421 </div>
422 <div class="yatra-filter-content">
423 <?php
424 $yatra_sidebar_cb_rows = [];
425 foreach ($destinations as $destination) {
426 $yatra_sidebar_cb_rows[] = [
427 'value' => $destination->id,
428 'label' => $destination->name,
429 'count' => (int) $destination->count,
430 ];
431 }
432 $yatra_sidebar_cb_input_name = 'destinations[]';
433 $yatra_sidebar_cb_active = $active_filters['destinations'] ?? [];
434 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
435 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
436 ?>
437 </div>
438 </div>
439 <?php endif; ?>
440
441 <!-- Activities -->
442 <?php
443 $activities = $filter_data['activities'] ?? [];
444 if (!empty($activities)) :
445 ?>
446 <div class="yatra-filter-section">
447 <div class="yatra-filter-title" data-toggle="activities">
448 <div class="yatra-filter-title-content">
449 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
450 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
451 </svg>
452 <span><?php esc_html_e('Activities', 'yatra'); ?></span>
453 </div>
454 <div class="yatra-filter-actions">
455 <span class="yatra-clear-section" data-section="activities" title="<?php esc_attr_e('Clear activity filters', 'yatra'); ?>">
456 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
457 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
458 </svg>
459 </span>
460 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
461 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
462 </svg>
463 </div>
464 </div>
465 <div class="yatra-filter-content">
466 <?php
467 $yatra_sidebar_cb_rows = [];
468 foreach ($activities as $activity) {
469 $yatra_sidebar_cb_rows[] = [
470 'value' => $activity->id,
471 'label' => $activity->name,
472 'count' => (int) $activity->count,
473 ];
474 }
475 $yatra_sidebar_cb_input_name = 'activities[]';
476 $yatra_sidebar_cb_active = $active_filters['activities'] ?? [];
477 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
478 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
479 ?>
480 </div>
481 </div>
482 <?php endif; ?>
483
484 <!-- Accommodation Type -->
485 <?php
486 // Get accommodation types from service
487 $accommodation_types = $filter_data['accommodations'] ?? [];
488
489 if (!empty($accommodation_types)) :
490 ?>
491 <div class="yatra-filter-section">
492 <div class="yatra-filter-title" data-toggle="accommodation">
493 <div class="yatra-filter-title-content">
494 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
495 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"/>
496 </svg>
497 <span><?php esc_html_e('Accommodation', 'yatra'); ?></span>
498 </div>
499 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
500 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
501 </svg>
502 </div>
503 <div class="yatra-filter-content">
504 <?php
505 $yatra_sidebar_cb_rows = [];
506 foreach ($accommodation_types as $accommodation) {
507 $yatra_sidebar_cb_rows[] = [
508 'value' => $accommodation->name,
509 'label' => ucwords(str_replace(['_', '-'], ' ', $accommodation->name)),
510 'count' => (int) $accommodation->trip_count,
511 ];
512 }
513 $yatra_sidebar_cb_input_name = 'accommodation[]';
514 $yatra_sidebar_cb_active = $active_filters['accommodation'] ?? [];
515 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
516 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
517 ?>
518 </div>
519 </div>
520 <?php endif; ?>
521
522 <!-- Included Services -->
523 <?php
524 // Get included services from service
525 $included_services = $filter_data['included_services'] ?? [];
526
527 if (!empty($included_services)) :
528 ?>
529 <div class="yatra-filter-section">
530 <div class="yatra-filter-title" data-toggle="services">
531 <div class="yatra-filter-title-content">
532 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
533 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"/>
534 </svg>
535 <span><?php esc_html_e('Included Services', 'yatra'); ?></span>
536 </div>
537 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
538 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
539 </svg>
540 </div>
541 <div class="yatra-filter-content">
542 <?php
543 $yatra_sidebar_cb_rows = [];
544 foreach ($included_services as $service) {
545 $yatra_sidebar_cb_rows[] = [
546 'value' => $service->service_name,
547 'label' => $service->service_name,
548 'count' => (int) $service->trip_count,
549 ];
550 }
551 $yatra_sidebar_cb_input_name = 'services[]';
552 $yatra_sidebar_cb_active = $active_filters['services'] ?? [];
553 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
554 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
555 ?>
556 </div>
557 </div>
558 <?php endif; ?>
559
560 <!-- Special Offers -->
561 <?php
562 // Get special offers from service
563 $special_offers = $filter_data['special_offers'] ?? [];
564
565 if (!empty($special_offers)) :
566 ?>
567 <div class="yatra-filter-section">
568 <div class="yatra-filter-title" data-toggle="offers">
569 <div class="yatra-filter-title-content">
570 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
571 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"/>
572 </svg>
573 <span><?php esc_html_e('Special Offers', 'yatra'); ?></span>
574 </div>
575 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
576 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
577 </svg>
578 </div>
579 <div class="yatra-filter-content">
580 <?php
581 $yatra_sidebar_cb_rows = [];
582 foreach ($special_offers as $offer) {
583 $yatra_sidebar_cb_rows[] = [
584 'value' => $offer->value,
585 'label' => $offer->label,
586 'count' => (int) $offer->count,
587 ];
588 }
589 $yatra_sidebar_cb_input_name = 'offers[]';
590 $yatra_sidebar_cb_active = $active_filters['offers'] ?? [];
591 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
592 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
593 ?>
594 </div>
595 </div>
596 <?php endif; ?>
597
598 <!-- Booking Options -->
599 <?php
600 // Get booking options from service
601 $booking_options = $filter_data['booking_options'] ?? [];
602
603 if (!empty($booking_options)) :
604 ?>
605 <div class="yatra-filter-section">
606 <div class="yatra-filter-title" data-toggle="booking">
607 <div class="yatra-filter-title-content">
608 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
609 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
610 </svg>
611 <span><?php esc_html_e('Booking Options', 'yatra'); ?></span>
612 </div>
613 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
614 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
615 </svg>
616 </div>
617 <div class="yatra-filter-content">
618 <?php
619 $yatra_sidebar_cb_rows = [];
620 foreach ($booking_options as $option) {
621 $yatra_sidebar_cb_rows[] = [
622 'value' => $option->value,
623 'label' => $option->label,
624 'count' => (int) $option->count,
625 ];
626 }
627 $yatra_sidebar_cb_input_name = 'booking[]';
628 $yatra_sidebar_cb_active = $active_filters['booking'] ?? [];
629 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
630 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
631 ?>
632 </div>
633 </div>
634 <?php endif; ?>
635
636 <!-- Age Suitability -->
637 <?php
638 // Get age restrictions from service
639 $age_options = $filter_data['age_restrictions'] ?? [];
640
641 if (!empty($age_options)) :
642 ?>
643 <div class="yatra-filter-section">
644 <div class="yatra-filter-title" data-toggle="age">
645 <div class="yatra-filter-title-content">
646 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
647 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
648 </svg>
649 <span><?php esc_html_e('Age Suitability', 'yatra'); ?></span>
650 </div>
651 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
652 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
653 </svg>
654 </div>
655 <div class="yatra-filter-content">
656 <?php
657 $yatra_sidebar_cb_rows = [];
658 foreach ($age_options as $option) {
659 $yatra_sidebar_cb_rows[] = [
660 'value' => $option->value,
661 'label' => $option->label,
662 'count' => (int) $option->count,
663 ];
664 }
665 $yatra_sidebar_cb_input_name = 'age[]';
666 $yatra_sidebar_cb_active = $active_filters['age'] ?? [];
667 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
668 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
669 ?>
670 </div>
671 </div>
672 <?php endif; ?>
673
674 <!-- Trip Attributes Filter -->
675 <?php if (is_array($yatra_trip_list) && !empty($yatra_trip_list['attributes'])) : ?>
676 <div class="yatra-filter-section">
677 <div class="yatra-filter-title" data-toggle="trip-attributes">
678 <div class="yatra-filter-title-content">
679 <svg class="yatra-filter-icon" width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
680 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"/>
681 </svg>
682 <span><?php esc_html_e('Trip Attributes', 'yatra'); ?></span>
683 </div>
684 <div class="yatra-filter-actions">
685 <span class="yatra-clear-section" data-section="trip-attributes" title="<?php esc_attr_e('Clear trip attribute filters', 'yatra'); ?>">
686 <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24">
687 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
688 </svg>
689 </span>
690 <svg class="yatra-filter-arrow" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
691 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
692 </svg>
693 </div>
694 </div>
695 <div class="yatra-filter-content">
696 <?php foreach ($yatra_trip_list['attributes'] as $attribute) : ?>
697 <?php
698 $attribute_filter_name = 'attributes[' . $attribute['id'] . ']';
699 $current_values = $active_filters['attributes'][$attribute['id']] ?? [];
700
701 $field_options = [];
702 if (!empty($attribute['field_options'])) {
703 $field_options = is_array($attribute['field_options']) ?
704 $attribute['field_options'] :
705 (json_decode($attribute['field_options'], true) ?: []);
706 }
707 ?>
708
709 <div class="yatra-attribute-item">
710 <div class="yatra-attribute-label">
711 <?php if (!empty($attribute['icon'])) : ?>
712 <?php
713 $icon_data = maybe_unserialize($attribute['icon']);
714 if (is_array($icon_data) && $icon_data['type'] === 'image' && !empty($icon_data['value'])) {
715 $image_url = '';
716 if (is_numeric($icon_data['value'])) {
717 $image_url = wp_get_attachment_image_url((int) $icon_data['value'], 'thumbnail');
718 } elseif (is_string($icon_data['value']) && filter_var($icon_data['value'], FILTER_VALIDATE_URL)) {
719 $image_url = $icon_data['value'];
720 }
721 if (!empty($image_url)) {
722 echo '<img class="yatra-attribute-icon" src="' . esc_url($image_url) . '" alt="' . esc_attr($attribute['name']) . '" width="16" height="16">';
723 }
724 } elseif (is_array($icon_data) && $icon_data['type'] === 'icon' && !empty($icon_data['value'])) {
725 echo '<span class="yatra-attribute-icon">' . yatra_svg_icon($icon_data['value'], '') . '</span>';
726 }
727 ?>
728 <?php endif; ?>
729 <span class="yatra-attribute-name"><?php echo esc_html($attribute['name']); ?></span>
730 </div>
731 <div class="yatra-attribute-content">
732 <?php if (($attribute['field_type'] === 'select' || $attribute['field_type'] === 'radio') && !empty($field_options)) : ?>
733 <?php
734 $yatra_sidebar_cb_rows = [];
735 foreach ($field_options as $option) {
736 $yatra_sidebar_cb_rows[] = [
737 'value' => $option['value'],
738 'label' => $option['label'],
739 ];
740 }
741 $yatra_sidebar_cb_input_name = $attribute_filter_name . '[]';
742 $yatra_sidebar_cb_active = $current_values;
743 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
744 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
745 ?>
746
747 <?php elseif ($attribute['field_type'] === 'checkbox' && !empty($field_options)) : ?>
748 <?php
749 $yatra_sidebar_cb_rows = [];
750 foreach ($field_options as $option) {
751 $yatra_sidebar_cb_rows[] = [
752 'value' => $option['value'],
753 'label' => $option['label'],
754 ];
755 }
756 $yatra_sidebar_cb_input_name = $attribute_filter_name . '[]';
757 $yatra_sidebar_cb_active = is_array($current_values) ? $current_values : [];
758 include __DIR__ . '/partials/listing-sidebar-collapsible-checkboxes.php';
759 unset($yatra_sidebar_cb_rows, $yatra_sidebar_cb_input_name, $yatra_sidebar_cb_active);
760 ?>
761
762 <?php elseif ($attribute['field_type'] === 'checkbox') : ?>
763 <div class="yatra-checkbox-group">
764 <label class="yatra-checkbox-label">
765 <input
766 type="checkbox"
767 name="<?php echo esc_attr($attribute_filter_name); ?>"
768 value="1"
769 <?php echo in_array('1', (array) $current_values, true) ? 'checked' : ''; ?>
770 >
771 <span><?php _e('Yes', 'yatra'); ?></span>
772 </label>
773 </div>
774
775 <?php elseif ($attribute['field_type'] === 'number') : ?>
776 <div class="yatra-input-group">
777 <input
778 type="number"
779 name="<?php echo esc_attr($attribute_filter_name); ?>[min]"
780 placeholder="<?php esc_attr_e('Min', 'yatra'); ?>"
781 value="<?php echo esc_attr($current_values['min'] ?? ''); ?>"
782 class="yatra-filter-input"
783 >
784 <input
785 type="number"
786 name="<?php echo esc_attr($attribute_filter_name); ?>[max]"
787 placeholder="<?php esc_attr_e('Max', 'yatra'); ?>"
788 value="<?php echo esc_attr($current_values['max'] ?? ''); ?>"
789 class="yatra-filter-input"
790 >
791 </div>
792
793 <?php elseif ($attribute['field_type'] === 'date') : ?>
794 <div class="yatra-input-group">
795 <input
796 type="date"
797 name="<?php echo esc_attr($attribute_filter_name); ?>[from]"
798 value="<?php echo esc_attr($current_values['from'] ?? ''); ?>"
799 class="yatra-filter-input"
800 >
801 <input
802 type="date"
803 name="<?php echo esc_attr($attribute_filter_name); ?>[to]"
804 value="<?php echo esc_attr($current_values['to'] ?? ''); ?>"
805 class="yatra-filter-input"
806 >
807 </div>
808
809 <?php else : ?>
810 <input
811 type="text"
812 name="<?php echo esc_attr($attribute_filter_name); ?>"
813 placeholder="<?php esc_attr_e('Type to filter…', 'yatra'); ?>"
814 value="<?php echo esc_attr(implode(', ', $current_values)); ?>"
815 class="yatra-filter-input"
816 >
817 <?php endif; ?>
818 </div>
819 </div>
820 <?php endforeach; ?>
821 </div>
822 </div>
823 <?php endif; ?>
824
825 </aside>
826
827 <!-- Main Content Area -->
828 <main class="yatra-listing-content">
829 <?php if (count($trips_source) > 0) : ?>
830 <div class="yatra-trip-grid" id="trip-grid">
831 <?php foreach ($trips_source as $trip) : ?>
832 <!-- Use the reusable trip-listing-card.php component -->
833 <?php include(dirname(__FILE__) . '/trip-listing-card.php'); ?>
834 <?php endforeach; ?>
835 </div>
836 <?php else : ?>
837 <div class="yatra-empty-state text-center py-12">
838 <svg class="mx-auto h-8 w-8 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
839 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
840 </svg>
841 <h3 class="mt-2 text-lg font-medium text-gray-900 dark:text-gray-100"><?php esc_html_e('No trips found', 'yatra'); ?></h3>
842 <p class="mt-1 text-gray-500 dark:text-gray-400"><?php esc_html_e('Try adjusting your search or filter to find what you\'re looking for.', 'yatra'); ?></p>
843 </div>
844 <?php endif; ?>
845
846 <div class="yatra-listing-pagination yatra-listing-pagination--trip-content">
847 <?php
848 $prev_url = $yatra_pagination['prev_url'] ?? null;
849 $next_url = $yatra_pagination['next_url'] ?? null;
850 $prev_disabled = empty($prev_url);
851 $next_disabled = empty($next_url);
852 ?>
853 <a class="yatra-pagination-btn <?php echo $prev_disabled ? 'disabled' : ''; ?>" href="<?php echo $prev_disabled ? 'javascript:void(0);' : esc_url($prev_url); ?>">
854 <?php echo yatra_svg_icon('chevron-left', 'yatra-btn-icon'); ?>
855 <span><?php esc_html_e('Previous', 'yatra'); ?></span>
856 </a>
857 <?php foreach (($yatra_pagination['items'] ?? []) as $pitem) : ?>
858 <?php if (($pitem['type'] ?? '') === 'ellipsis') : ?>
859 <span class="yatra-pagination-ellipsis">...</span>
860 <?php elseif (($pitem['type'] ?? '') === 'page') : ?>
861 <a class="yatra-pagination-btn <?php echo !empty($pitem['is_current']) ? 'active' : ''; ?>" href="<?php echo esc_url((string) ($pitem['url'] ?? '')); ?>">
862 <?php echo esc_html((string) ($pitem['page'] ?? '')); ?>
863 </a>
864 <?php endif; ?>
865 <?php endforeach; ?>
866 <a class="yatra-pagination-btn <?php echo $next_disabled ? 'disabled' : ''; ?>" href="<?php echo $next_disabled ? 'javascript:void(0);' : esc_url($next_url); ?>">
867 <span><?php esc_html_e('Next', 'yatra'); ?></span>
868 <?php echo yatra_svg_icon('chevron-right', 'yatra-btn-icon'); ?>
869 </a>
870 </div>
871 </main>
872 </div>
873 </div>
874 </div>
875 </div>
876
877 <?php
878 yatra_get_footer();
879 ?>
880