Ejemplo n.º 1
0
				<div class="score"><span><?php 
    echo esc_html($doubled_review);
    ?>
</span><?php 
    echo esc_html($review_content);
    ?>
</div>
			<?php 
}
?>
			<div class="short_info hotel">
				<?php 
echo esc_html__('From/Per night', 'citytours');
?>
				<span class="price"><?php 
echo ct_price($price, 'special');
?>
</span>
			</div>
			</a>
		</div>
		<div class="hotel_title">
			<h3><?php 
echo esc_html(get_the_title($post_id));
?>
</h3>
			<div class="rating">
				<?php 
ct_rating_smiles($star, 'icon-star-empty', 'icon-star voted');
?>
			</div><!-- end rating -->
Ejemplo n.º 2
0
            echo ct_price($total_price);
        }
        ?>
</td>
						</tr>
						<?php 
        if (!empty($deposit_rate) && $deposit_rate < 100) {
            ?>
							<tr>
								<td><?php 
            echo sprintf(esc_html__('Security Deposit (%d%%)', 'citytours'), $deposit_rate);
            ?>
</td>
								<td class="text-right"><?php 
            if (!empty($total_price)) {
                echo ct_price($total_price * $deposit_rate / 100);
            }
            ?>
</td>
							</tr>
						<?php 
        }
        ?>
					</tbody>
					</table>
					<a class="btn_full book-now-btn" href="#"><?php 
        echo esc_html__('Book now', 'citytours');
        ?>
</a>
					<a class="btn_full update-cart-btn" href="#"><?php 
        echo esc_html__('Update Cart', 'citytours');
Ejemplo n.º 3
0
 function ct_hotel_generate_conf_mail($order, $type = 'new')
 {
     global $wpdb, $ct_options;
     $order_data = $order->get_order_info();
     if (!empty($order_data)) {
         // server variables
         $admin_email = get_option('admin_email');
         $home_url = esc_url(home_url('/'));
         $site_name = $_SERVER['SERVER_NAME'];
         $logo_url = esc_url(ct_logo_url());
         $order_data['hotel_id'] = ct_hotel_clang_id($order_data['post_id']);
         // hotel info
         $hotel_name = get_the_title($order_data['hotel_id']);
         $hotel_url = esc_url(ct_get_permalink_clang($order_data['hotel_id']));
         $hotel_thumbnail = get_the_post_thumbnail($order_data['hotel_id'], 'medium');
         $hotel_address = get_post_meta($order_data['hotel_id'], 'ct_hotel_address', true);
         $hotel_email = get_post_meta($order_data['hotel_id'], 'ct_hotel_email', true);
         $hotel_phone = get_post_meta($order_data['hotel_id'], 'ct_hotel_phone', true);
         // room info
         $booking_rooms = '<table><tbody><tr><th>' . esc_html__('Room Name', 'citytours') . '</th><th>' . esc_html__('Rooms', 'citytours') . '</th><th>' . esc_html__('Adults', 'citytours') . '</th><th>' . esc_html__('Kids', 'citytours') . '</th><th>' . esc_html__('Total Price', 'citytours') . '</th></tr>';
         $rooms_booking_data = $order->get_rooms();
         if (!empty($rooms_booking_data)) {
             foreach ($rooms_booking_data as $key => $room_data) {
                 $room_type_id = ct_room_clang_id($room_data['room_type_id']);
                 $room_type_title = esc_html(get_the_title($room_type_id));
                 $booking_rooms .= '<tr><td>' . $room_type_title . '</td><td>' . $room_data['rooms'] . '</td><td>' . $room_data['adults'] . '</td><td>' . $room_data['kids'] . '</td><td>' . $room_data['total_price'] . '</td></tr>';
             }
         }
         $booking_rooms .= '</tbody></table>';
         // services info
         $booking_services = '<table><tbody><tr><th>' . esc_html__('Service Name', 'citytours') . '</th><th>' . esc_html__('Total Price', 'citytours') . '</th></tr>';
         $services_booking_data = $order->get_services();
         if (!empty($services_booking_data)) {
             foreach ($services_booking_data as $key => $service_booking_data) {
                 $service_data = ct_get_add_service($service_booking_data['add_service_id']);
                 $service_total_price = $service_booking_data['total_price'];
                 $booking_services .= '<tr><td>' . $service_data->title . '</td><td>' . $service_total_price . '</td></tr>';
             }
         }
         $booking_services .= '</tbody></table>';
         // booking info
         $date_from = new DateTime($order_data['date_from']);
         $date_to = new DateTime($order_data['date_to']);
         $number1 = $date_from->format('U');
         $number2 = $date_to->format('U');
         $booking_nights = ($number2 - $number1) / (3600 * 24);
         $booking_from_date = date('j F Y', strtotime($order_data['date_from']));
         $booking_to_date = date('j F Y', strtotime($order_data['date_to']));
         $booking_adults = $order_data['total_adults'];
         $booking_kids = $order_data['total_kids'];
         $booking_total_price = esc_html(ct_price($order_data['total_price'] * $order_data['exchange_rate'], $order_data['currency_code'], 0));
         $booking_deposit_price = esc_html($order_data['deposit_price'] . $order_data['currency_code']);
         $booking_deposit_paid = esc_html(empty($order_data['deposit_paid']) ? 'No' : 'Yes');
         $booking_no = $order_data['booking_no'];
         $booking_pincode = $order_data['pin_code'];
         // customer info
         $customer_first_name = $order_data['first_name'];
         $customer_last_name = $order_data['last_name'];
         $customer_email = $order_data['email'];
         $customer_country_code = $order_data['country'];
         $customer_phone = $order_data['phone'];
         $customer_address1 = $order_data['address1'];
         $customer_address2 = $order_data['address2'];
         $customer_city = $order_data['city'];
         $customer_zip = $order_data['zip'];
         $customer_country = $order_data['country'];
         $customer_special_requirements = $order_data['special_requirements'];
         $variables = array('home_url', 'site_name', 'logo_url', 'hotel_name', 'hotel_url', 'hotel_thumbnail', 'hotel_address', 'hotel_email', 'hotel_phone', 'booking_rooms', 'booking_services', 'booking_no', 'booking_pincode', 'booking_from_date', 'booking_to_date', 'booking_nights', 'booking_adults', 'booking_kids', 'booking_total_price', 'booking_deposit_paid', 'booking_deposit_price', 'customer_first_name', 'customer_last_name', 'customer_email', 'customer_country_code', 'customer_phone', 'customer_address1', 'customer_address2', 'customer_city', 'customer_zip', 'customer_country', 'customer_special_requirements');
         if (empty($subject)) {
             $subject = empty($ct_options['hotel_confirm_email_subject']) ? 'Booking Confirmation Email Subject' : $ct_options['hotel_confirm_email_subject'];
         }
         if (empty($description)) {
             $description = empty($ct_options['hotel_confirm_email_description']) ? 'Booking Confirmation Email Description' : $ct_options['hotel_confirm_email_description'];
         }
         foreach ($variables as $variable) {
             $subject = str_replace("[" . $variable . "]", ${$variable}, $subject);
             $description = str_replace("[" . $variable . "]", ${$variable}, $description);
         }
         $mail_sent = ct_send_mail($site_name, $admin_email, $customer_email, $subject, $description);
         /* mailing function to admin */
         if (!empty($ct_options['hotel_booked_notify_admin'])) {
             $subject = empty($ct_options['hotel_admin_email_subject']) ? 'You received a booking' : $ct_options['hotel_admin_email_subject'];
             $description = empty($ct_options['hotel_admin_email_description']) ? 'Booking Details' : $ct_options['hotel_admin_email_description'];
             foreach ($variables as $variable) {
                 $subject = str_replace("[" . $variable . "]", ${$variable}, $subject);
                 $description = str_replace("[" . $variable . "]", ${$variable}, $description);
             }
             ct_send_mail($site_name, $admin_email, $admin_email, $subject, $description);
         }
         return true;
     }
     return false;
 }
Ejemplo n.º 4
0
                ?>
</span>
						<?php 
            }
            ?>
					</td>
				</tr>
				<tr class="total">
					<td>
						<?php 
            echo esc_html__('Total cost', 'citytours');
            ?>
					</td>
					<td class="text-right total-cost">
						<?php 
            echo ct_price($person_price);
            ?>
					</td>
				</tr>
				</tbody>
				</table>
				<button type="submit" class="btn_full book-now"><?php 
            echo esc_html__('Book now', 'citytours');
            ?>
</button>
				<?php 
            if (!empty($ct_options['wishlist'])) {
                ?>
				<?php 
                if (is_user_logged_in()) {
                    $user_id = get_current_user_id();
Ejemplo n.º 5
0
</strong></td>
					<td ><?php 
    echo ct_price($order_data['deposit_price'], "", $order_data['currency_code'], 0);
    ?>
</td>
				</tr>
			<?php 
}
?>
			<tr>
				<td><strong><?php 
echo esc_html__('TOTAL COST', 'citytours');
?>
</strong></td>
				<td ><?php 
echo ct_price($order_data['total_price']);
?>
</td>
			</tr>
			</tbody>
			</table>
		</div><!--End step -->
	</div><!--End col-md-8 -->

	<aside class="col-md-4">
	<div class="box_style_1">
		<h3 class="inner"><?php 
echo esc_html__('Thank you!', 'citytours');
?>
</h3>
		<!-- <p><?php 
Ejemplo n.º 6
0
									<td class="thick-line text-right"><?php 
        echo ct_price($order_info['total_price']);
        ?>
</td>
								</tr>
								<?php 
        if (!empty($deposit_rate) && $deposit_rate < 100) {
            ?>
									<tr>
										<td class="no-line"></td>
										<td class="no-line text-center"><strong><?php 
            echo sprintf(esc_html__('Security Deposit (%d%%)', 'citytours'), $deposit_rate);
            ?>
</strong></td>
										<td class="no-line text-right"><?php 
            echo ct_price($order_info['deposit_price'], "", $order_info['currency_code'], 0);
            ?>
</td>
									</tr>
								<?php 
        }
        ?>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>

	<?php 
Ejemplo n.º 7
0
            ?>
 - <?php 
            echo ct_price($step_arr[$i + 1]);
            ?>
</label></li>
								<?php 
        } else {
            ?>
									<li><label><input type="checkbox" name="price_filter[]" value="<?php 
            echo esc_attr($i);
            ?>
"<?php 
            echo $checked;
            ?>
><?php 
            echo ct_price($step_arr[$i]);
            ?>
 +</label></li>
								<?php 
        }
        ?>
							<?php 
    }
    ?>
						</ul>
					</div>
				<?php 
}
?>

				<?php 
Ejemplo n.º 8
0
 function shortcode_tours($atts)
 {
     extract(shortcode_atts(array('title' => '', 'type' => 'latest', 'style' => 'advanced', 'count' => 6, 'count_per_row' => 3, 'tour_type' => '', 'post_ids' => '', 'class' => ''), $atts));
     if (!ct_is_tour_enabled()) {
         return '';
     }
     $styles = array('advanced', 'simple', 'list');
     $types = array('latest', 'featured', 'popular', 'hot', 'selected');
     if (!in_array($style, $styles)) {
         $style = 'advanced';
     }
     if (!in_array($type, $types)) {
         $type = 'latest';
     }
     $post_ids = explode(',', $post_ids);
     $count = is_numeric($count) ? $count : 6;
     $count_per_row = is_numeric($count_per_row) ? $count_per_row : 3;
     $tour_type = !empty($tour_type) ? explode(',', $tour_type) : array();
     global $before_list, $post_id;
     $before_list = '';
     if (2 == $count_per_row) {
         $before_list = '<div class="col-md-6 col-sm-6 wow zoomIn" data-wow-delay="0.1s">';
     } elseif (4 == $count_per_row) {
         $before_list = '<div class="col-md-3 col-sm-6 wow zoomIn" data-wow-delay="0.1s">';
     } else {
         $before_list = '<div class="col-md-4 col-sm-6 wow zoomIn" data-wow-delay="0.1s">';
     }
     $tours = array();
     if ($type == 'selected') {
         $tours = ct_tour_get_tours_from_id($post_ids);
     } else {
         $tours = ct_tour_get_special_tours($type, $count, array(), $tour_type);
     }
     if ($style == 'simple') {
         $output = '<div class="other_tours"><ul>';
         foreach ($tours as $post_obj) {
             $post_id = $post_obj->ID;
             $price = get_post_meta($post_id, '_tour_price', true);
             $tour_type = wp_get_post_terms($post_id, 'tour_type');
             $output .= '<li><a href="' . esc_url(get_permalink($post_id)) . '">';
             if (!empty($tour_type)) {
                 $icon_class = get_tax_meta($tour_type[0]->term_id, 'ct_tax_icon_class', true);
                 $output .= '<i class="' . esc_attr($icon_class) . '"></i>';
             }
             $output .= get_the_title($post_id) . '<span class="other_tours_price">' . ct_price($price) . '</span></a></li>';
         }
         $output .= '</ul></div>';
     } elseif ($style == 'list') {
         ob_start();
         if (!empty($title)) {
             echo '<h2>' . esc_html($title) . '</h2>';
         }
         echo '<div class="tour-list row add-clearfix' . esc_attr($class) . '">';
         foreach ($tours as $post_obj) {
             $post_id = $post_obj->ID;
             ct_get_template('loop-list.php', '/templates/tour/');
         }
         echo '</div>';
         $output = ob_get_contents();
         ob_end_clean();
     } else {
         ob_start();
         if (!empty($title)) {
             echo '<h2>' . esc_html($title) . '</h2>';
         }
         echo '<div class="tour-list row add-clearfix' . esc_attr($class) . '">';
         foreach ($tours as $post_obj) {
             $post_id = $post_obj->ID;
             ct_get_template('loop-grid.php', '/templates/tour/');
         }
         echo '</div>';
         $output = ob_get_contents();
         ob_end_clean();
     }
     return $output;
 }
Ejemplo n.º 9
0
								<h1><?php 
            the_title();
            ?>
</h1>
								<span><?php 
            echo esc_html($address, 'citytours');
            ?>
</span>
							</div>
							<div class="col-md-4 col-sm-4">
								<div id="price_single_main">
									<?php 
            echo esc_html__('from/per night', 'citytours');
            ?>
 <?php 
            echo ct_price($person_price, "special");
            ?>
								</div>
							</div>
						</div>
					</div>
				</div>
			</section><!-- End section -->
			<div id="position">

		<?php 
        } else {
            ?>
			<div id="position" class="blank-parallax">
		<?php 
        }