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:
89
wp-content/plugins/eagle-booking/core/vc/services/index.php
Normal file
89
wp-content/plugins/eagle-booking/core/vc/services/index.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/*---------------------------------------------------------------------------------
|
||||
SERVICES GRID
|
||||
-----------------------------------------------------------------------------------*/
|
||||
add_action( 'vc_before_init', 'eagle_vc_room_services' );
|
||||
function eagle_vc_room_services() {
|
||||
|
||||
vc_map( array(
|
||||
"name" => esc_html__( "Room Services", "eagle-booking" ),
|
||||
"description" => '',
|
||||
"base" => "eb-services",
|
||||
'category' => esc_html__("Eagle Themes",'eagle-booking'),
|
||||
"class" => "",
|
||||
'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" => "posts_limit",
|
||||
"type" => "textfield",
|
||||
"value" => "3",
|
||||
"heading" => esc_html__("Items", "eagle-booking"),
|
||||
"description" => "",
|
||||
"save_always" => true,
|
||||
),
|
||||
|
||||
array(
|
||||
"param_name" => "posts_per_row",
|
||||
"type" => "dropdown",
|
||||
"value" => array('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" => "type",
|
||||
"type" => "dropdown",
|
||||
"value" => array(
|
||||
'All' => 'all',
|
||||
'Normal' => 'normal',
|
||||
'Additional' => 'additional'
|
||||
),
|
||||
"default" => "all",
|
||||
"heading" => esc_html__("Services Type", "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 ROOM SERVICES LAYOUT
|
||||
foreach ( glob ( plugin_dir_path( __FILE__ ) . "layout/*.php" ) as $file ){
|
||||
include_once $file;
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/*---------------------------------------------------------------------------------
|
||||
SERVICES GRID
|
||||
-----------------------------------------------------------------------------------*/
|
||||
if( !function_exists('eagle_room_services') ) {
|
||||
function eagle_room_services($atts, $content = null)
|
||||
{
|
||||
extract(shortcode_atts(array(
|
||||
'posts_limit' => '',
|
||||
'posts_per_row' => '',
|
||||
'offset' => '',
|
||||
'orderby' => '',
|
||||
'order' => '',
|
||||
'type' => '',
|
||||
), $atts));
|
||||
|
||||
ob_start();
|
||||
|
||||
if ( $type === 'all' || $type === '' ) $type = array ( 'normal', 'additional' );
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'eagle_services',
|
||||
'posts_per_page' => $posts_limit,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'offset' => $offset,
|
||||
|
||||
'meta_query'=> array(
|
||||
|
||||
array(
|
||||
'key' => 'eagle_booking_mtb_service_type',
|
||||
'compare' => 'IN',
|
||||
'value' => $type,
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
$service_qry = new WP_Query($args);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="room-services-list room-services-list-page">
|
||||
<div class="row">
|
||||
<?php
|
||||
if ($service_qry->have_posts()): while ($service_qry->have_posts()): $service_qry->the_post();
|
||||
|
||||
$eagle_booking_service_id = get_the_ID();
|
||||
$eagle_booking_service_name = get_the_title($eagle_booking_service_id);
|
||||
// Service Icon
|
||||
$eagle_booking_service_icon_type = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_icon_type', true );
|
||||
if ($eagle_booking_service_icon_type == 'fontawesome') {
|
||||
$eagle_booking_service_icon = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_icon_fontawesome', true );
|
||||
} else {
|
||||
$eagle_booking_service_icon = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_icon', true );
|
||||
}
|
||||
$eagle_booking_mtb_service_image = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_image', true );
|
||||
$eagle_booking_mtb_service_image_class_original = str_replace(' ', '-', $eagle_booking_service_name);
|
||||
$eagle_booking_mtb_service_image_class = strtolower($eagle_booking_mtb_service_image_class_original);
|
||||
$eagle_booking_service_description = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_description', true );
|
||||
|
||||
$col_class = '4';
|
||||
if ($posts_per_row == '6') { $col_class = '2'; }
|
||||
if ($posts_per_row == '4') { $col_class = '3'; }
|
||||
if ($posts_per_row == '3') { $col_class = '4'; }
|
||||
if ($posts_per_row == '2') { $col_class = '6'; }
|
||||
|
||||
?>
|
||||
<!-- SERVICE GRID ITEM -->
|
||||
<div class="col-lg-<?php echo esc_attr( $col_class ) ?>">
|
||||
<div class="room-services-item">
|
||||
<?php if ($eagle_booking_service_icon_type == 'customicon') : ?>
|
||||
<img src="<?php echo esc_url($eagle_booking_mtb_service_image) ?>" class="<?php echo esc_attr($eagle_booking_mtb_service_image_class) ?>">
|
||||
<?php else : ?>
|
||||
<i class="<?php echo $eagle_booking_service_icon ?>"></i>
|
||||
<?php endif ?>
|
||||
<?php echo esc_html($eagle_booking_service_name) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$result = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $result;
|
||||
}
|
||||
|
||||
// Depracated Shortcode
|
||||
add_shortcode('zante-room-services', 'eagle_room_services');
|
||||
|
||||
// New Shortcode
|
||||
add_shortcode('eb-services', 'eagle_room_services');
|
||||
|
||||
add_shortcode('eb_services', 'eagle_room_services');
|
||||
}
|
||||
Reference in New Issue
Block a user