Esempio n. 1
0
                       </div>
                   </div>
               </div>
               <div class="col-lg-3">
                   <div class="room-detail_book animated fadeInRight" data-id="2">
                       <form method="post">
                           <div class="room-detail_total">
                               <h6>STARTING ROOM FROM</h6>
                               <p class="price">
                                   <?php 
   the_room_price_html();
   ?>
 /day
                               </p>
                               <?php 
   if (has_monthly_price()) {
       ?>
                               <p class="price">
                                   <?php 
       the_monthly_room_price_html();
       ?>
 /month
                               </p>
                               <?php 
   }
   ?>
                           </div>
                           <div class="room-detail_form">
                               <div class="form-group">
                                   <label>Arrive</label>
                                   <input type="text" name="date_in" id="date_in" class="date form-control" placeholder="Arrive Date" value="<?php 
Esempio n. 2
0
function room_listings_shortcode_handler($atts, $content = null)
{
    $output = '';
    $q = get_posts(array('post_type' => 'room_type', 'showposts' => -1));
    $output .= '<div class="room-wrap-1 animatedParent" data-sequence="500">';
    $output .= '<div class="row">';
    foreach ($q as $i => $t) {
        $output .= '<div class="col-md-6">';
        $output .= '<div class="room_item-1 animated bounceInDown" data-id="' . $i . '">';
        $output .= '<h2><a href="' . get_permalink($t->ID) . '">' . $t->post_title . '</a></h2>';
        $output .= '<div class="img">';
        $output .= '<a href="' . get_permalink($t->ID) . '"><img src="' . featured_image($t->ID, 'gallery-post-thumbnails') . '" alt=""></a>';
        $output .= '</div>';
        $output .= '<div class="desc">';
        $output .= '<p>' . wp_trim_words($t->post_content, 20) . '</p>';
        $output .= '<ul>';
        $output .= '<li><i class="fa fa-male"></i>Max: ' . get_field('max_person', $t->ID) . ' Person(s)</li>';
        $output .= '<li><i class="fa fa-bed"></i>Bed: ' . get_field('bed', $t->ID) . '</li>';
        $output .= '<li><i class="fa fa-arrows-alt"></i>Size: ' . get_field('room_size', $t->ID) . '</li>';
        $output .= '<li><i class="fa fa-expand"></i>Occupancy: ' . get_field('occupancy', $t->ID) . '</li>';
        $output .= '</ul>';
        $output .= '</div>';
        $output .= '<div class="bot">';
        $output .= '<span class="price">Starting ' . get_room_price_html($t->ID) . ' /days';
        if (has_monthly_price($t->ID)) {
            $output .= ' & ' . get_monthly_room_price_html($t->ID) . ' /month';
        }
        $output .= '</span>';
        $output .= '<a href="' . get_permalink($t->ID) . '" class="bdr-btn bdr-btn-fill-black">VIEW DETAILS</a>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
    }
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 3
0
function calculate_total_amount($room_type_id, $date_in, $date_out, $no_of_room)
{
    $nights = count_nights($date_in, $date_out);
    if ($nights >= 30 && has_monthly_price($room_type_id)) {
        $subtotal = get_monthly_price($room_type_id);
    } else {
        $subtotal = get_room_price($room_type_id, $date_in, $date_out) * $nights;
    }
    return $subtotal * $no_of_room;
}