Hotel Raxa - Advanced Booking System Implementation
🏨 Hotel Booking Enhancements: - Implemented Eagle Booking Advanced Pricing add-on - Added Booking.com-style rate management system - Created professional calendar interface for pricing - Integrated deals and discounts functionality 💰 Advanced Pricing Features: - Dynamic pricing models (per room, per person, per adult) - Base rates, adult rates, and child rates management - Length of stay discounts and early bird deals - Mobile rates and secret deals implementation - Seasonal promotions and flash sales 📅 Availability Management: - Real-time availability tracking - Stop sell and restriction controls - Closed to arrival/departure functionality - Minimum/maximum stay requirements - Automatic sold-out management 💳 Payment Integration: - Maintained Redsys payment gateway integration - Seamless integration with existing Eagle Booking - No modifications to core Eagle Booking plugin 🛠️ Technical Implementation: - Custom database tables for advanced pricing - WordPress hooks and filters integration - AJAX-powered admin interface - Data migration from existing Eagle Booking - Professional calendar view for revenue management 📊 Admin Interface: - Booking.com-style management dashboard - Visual rate and availability calendar - Bulk operations for date ranges - Statistics and analytics dashboard - Modal dialogs for quick editing 🔧 Code Quality: - WordPress coding standards compliance - Secure database operations with prepared statements - Proper input validation and sanitization - Error handling and logging - Responsive admin interface 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
127
wp-content/plugins/eagle-booking/core/vc/places/index.php
Normal file
127
wp-content/plugins/eagle-booking/core/vc/places/index.php
Normal file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
/*---------------------------------------------------------------------------------
|
||||
PLACES
|
||||
-----------------------------------------------------------------------------------*/
|
||||
if( !function_exists('eb_vc_places') ) {
|
||||
|
||||
add_action( 'vc_before_init', 'eb_vc_places' );
|
||||
function eb_vc_places() {
|
||||
|
||||
vc_map( array(
|
||||
"name" => esc_html__( "Places", "eagle-booking" ),
|
||||
"description" => '',
|
||||
"base" => "eb-places",
|
||||
'category' => esc_html__("Eagle Themes",'eagle-booking'),
|
||||
"class" => "",
|
||||
'admin_enqueue_js' => "",
|
||||
'admin_enqueue_css' => get_template_directory_uri()."/assets/css/admin/global.css",
|
||||
'front_enqueue_css' => get_template_directory_uri()."/assets/css/admin/global.css",
|
||||
"icon" => "icon-eagle",
|
||||
"params" => array(
|
||||
|
||||
array(
|
||||
"param_name" => "orderby",
|
||||
"type" => "dropdown",
|
||||
"value" => array('None' => 'none', 'ID' => 'ID', 'Title' => 'title', 'Date' => 'date', 'Random' => 'rand', 'Menu Order' => 'menu_order' ),
|
||||
"heading" => esc_html__("Order By:", "eagle-booking"),
|
||||
"description" => '',
|
||||
"save_always" => true,
|
||||
),
|
||||
array(
|
||||
"param_name" => "order",
|
||||
"type" => "dropdown",
|
||||
"value" => array('ASC' => 'ASC', 'DESC' => 'DESC' ),
|
||||
"heading" => esc_html__("Order:", "eagle-booking"),
|
||||
"description" => '',
|
||||
"save_always" => true,
|
||||
),
|
||||
array(
|
||||
"param_name" => "offset",
|
||||
"type" => "textfield",
|
||||
"value" => "",
|
||||
"heading" => esc_html__("Offset:", "eagle-booking"),
|
||||
"description" => "",
|
||||
"save_always" => true
|
||||
)
|
||||
|
||||
)
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------------
|
||||
PLACES GRID
|
||||
-----------------------------------------------------------------------------------*/
|
||||
if( !function_exists('eb_vc_places_grid') ) {
|
||||
|
||||
add_action( 'vc_before_init', 'eb_vc_places_grid' );
|
||||
function eb_vc_places_grid() {
|
||||
vc_map( array(
|
||||
"name" => esc_html__( "Places Grid", "eagle-booking" ),
|
||||
"description" => '',
|
||||
"base" => "eb-places-grid",
|
||||
'category' => esc_html__("Eagle Themes",'eagle-booking'),
|
||||
"class" => "",
|
||||
'admin_enqueue_js' => "",
|
||||
'admin_enqueue_css' => get_template_directory_uri()."/assets/css/admin/global.css",
|
||||
'front_enqueue_css' => get_template_directory_uri()."/assets/css/admin/global.css",
|
||||
"icon" => "icon-eagle",
|
||||
"params" => array(
|
||||
|
||||
array(
|
||||
"param_name" => "places_limit",
|
||||
"type" => "textfield",
|
||||
"value" => "6",
|
||||
"heading" => esc_html__("Items:", "eagle-booking"),
|
||||
"description" => "",
|
||||
"save_always" => true,
|
||||
),
|
||||
array(
|
||||
"param_name" => "places_per_row",
|
||||
"type" => "dropdown",
|
||||
"value" => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6'),
|
||||
"default" => "3",
|
||||
"heading" => esc_html__("Items per row:", "eagle-booking"),
|
||||
"description" => "",
|
||||
"save_always" => true,
|
||||
),
|
||||
array(
|
||||
"param_name" => "orderby",
|
||||
"type" => "dropdown",
|
||||
"value" => array('None' => 'none', 'ID' => 'ID', 'Title' => 'title', 'Date' => 'date', 'Random' => 'rand', 'Menu Order' => 'menu_order' ),
|
||||
"heading" => esc_html__("Order By:", "eagle-booking"),
|
||||
"description" => '',
|
||||
"save_always" => true,
|
||||
),
|
||||
array(
|
||||
"param_name" => "order",
|
||||
"type" => "dropdown",
|
||||
"value" => array('ASC' => 'ASC', 'DESC' => 'DESC' ),
|
||||
"heading" => esc_html__("Order:", "eagle-booking"),
|
||||
"description" => '',
|
||||
"save_always" => true,
|
||||
),
|
||||
array(
|
||||
"param_name" => "offset",
|
||||
"type" => "textfield",
|
||||
"value" => "",
|
||||
"heading" => esc_html__("Offset:", "eagle-booking"),
|
||||
"description" => "",
|
||||
"save_always" => true
|
||||
)
|
||||
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Include Palces Layout
|
||||
foreach ( glob ( plugin_dir_path( __FILE__ ) . "layout/*.php" ) as $file ){
|
||||
include_once $file;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/*---------------------------------------------------------------------------------
|
||||
places
|
||||
-----------------------------------------------------------------------------------*/
|
||||
if( !function_exists('eb_places_grid') ) {
|
||||
function eb_places_grid($atts, $content = null)
|
||||
{
|
||||
extract(shortcode_atts(array(
|
||||
'places_filters' => '',
|
||||
'places_limit' => '',
|
||||
'places_per_row' => '',
|
||||
'offset' => '',
|
||||
'orderby' => '',
|
||||
'order' => ''
|
||||
), $atts));
|
||||
|
||||
ob_start();
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'eagle_places',
|
||||
'posts_per_page' => $places_limit,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'offset' => $offset
|
||||
);
|
||||
$places_qry = new WP_Query($args);
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<?php
|
||||
if ($places_qry->have_posts()): while ($places_qry->have_posts()): $places_qry->the_post();
|
||||
$places_title = get_the_title();
|
||||
$places_url = get_permalink();
|
||||
$places_img_url = get_the_post_thumbnail_url('', 'eagle_booking_image_size_720_470');
|
||||
|
||||
$col_class = '4';
|
||||
if ($places_per_row == '6') { $col_class = '2'; }
|
||||
if ($places_per_row == '4') { $col_class = '3'; }
|
||||
if ($places_per_row == '3') { $col_class = '4'; }
|
||||
if ($places_per_row == '2') { $col_class = '6'; }
|
||||
if ($places_per_row == '1') { $col_class = '12'; }
|
||||
?>
|
||||
<!-- places ITEM -->
|
||||
<div class="col-lg-<?php echo esc_attr( $col_class ) ?> col-sm-6">
|
||||
<div class="place-item">
|
||||
<figure class="gradient-overlay zoom-hover">
|
||||
<a href="<?php echo esc_url( $places_url ) ?>">
|
||||
<img src="<?php echo esc_url( $places_img_url ) ?>" class="img-responsive">
|
||||
<div class="place-name">
|
||||
<h3><?php echo esc_html( $places_title ) ?></h3>
|
||||
</div>
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$result = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $result;
|
||||
}
|
||||
|
||||
// Depracated Shortcode
|
||||
add_shortcode('zante-places-grid', 'eb_places_grid');
|
||||
|
||||
// New Shortcode
|
||||
add_shortcode('eb-places-grid', 'eb_places_grid');
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/*---------------------------------------------------------------------------------
|
||||
VC Places
|
||||
-----------------------------------------------------------------------------------*/
|
||||
if( !function_exists('eb_places') ) {
|
||||
function eb_places($atts, $content = null)
|
||||
{
|
||||
extract(shortcode_atts(array(
|
||||
'offset' => '',
|
||||
'orderby' => '',
|
||||
'order' => ''
|
||||
), $atts));
|
||||
|
||||
ob_start();
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'eagle_places',
|
||||
'posts_per_page' => 4,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'offset' => $offset
|
||||
);
|
||||
$places_qry = new WP_Query($args);
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
|
||||
// Counter
|
||||
$eb_places_counter = '0';
|
||||
|
||||
// Start Loop
|
||||
if ($places_qry->have_posts()): while ($places_qry->have_posts()): $places_qry->the_post();
|
||||
|
||||
$eb_place_id = get_the_ID();
|
||||
$eb_place_title = get_the_title();
|
||||
$eb_place_url = get_permalink();
|
||||
$eb_place_img = get_the_post_thumbnail_url('', 'eagle_booking_image_size_720_470');
|
||||
|
||||
// Counter
|
||||
$eb_places_counter++;
|
||||
|
||||
// Item Class
|
||||
if ( $eb_places_counter == 1 ) {
|
||||
|
||||
$eb_place_class = 'first-place';
|
||||
|
||||
} elseif($eb_places_counter == 2) {
|
||||
|
||||
$eb_place_class = 'second-place';
|
||||
|
||||
} elseif($eb_places_counter == 3) {
|
||||
|
||||
$eb_place_class = 'third-place';
|
||||
|
||||
} else {
|
||||
$eb_place_class = 'fourth-place';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( $eb_places_counter == 3) : ?>
|
||||
<div class="col-lg-6">
|
||||
<div class="row">
|
||||
<?php endif ?>
|
||||
|
||||
<div class="col-md-6 <?php echo esc_attr($eb_place_class) ?>">
|
||||
<div class="place-item">
|
||||
<figure class="gradient-overlay zoom-hover">
|
||||
<a href="<?php echo esc_url( $eb_place_url ) ?>">
|
||||
<img src="<?php echo esc_url( $eb_place_img ) ?>" class="img-responsive" alt="<?php echo esc_html( $eb_place_title ) ?>">
|
||||
|
||||
<h3 class="place-title"><?php echo esc_html( $eb_place_title ) ?></h3>
|
||||
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( $eb_places_counter == 4) : ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$result = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $result;
|
||||
}
|
||||
|
||||
// Depracated Shortcode
|
||||
add_shortcode('zante-places', 'eb_places');
|
||||
|
||||
// New Shortcode
|
||||
add_shortcode('eb-places', 'eb_places');
|
||||
|
||||
add_shortcode('eb_places', 'eb_places');
|
||||
}
|
||||
Reference in New Issue
Block a user