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:
Hotel Raxa Dev
2025-07-11 07:43:22 +02:00
commit 5b1e2453c7
9816 changed files with 2784509 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
<?php
/**
* The Template for the additional services
*
* This template can be overridden by copying it to yourtheme/eb-templates/checkout/additional-services.php.
*
* Author: Eagle Themes
* Package: Eagle-Booking/Templates
* Version: 1.1.5
*/
defined('ABSPATH') || exit;
?>
<?php
$eagle_booking_form_extra_services = '';
if ( $eagle_booking_form_services ) :
$eagle_booking_additional_services_array = explode(',', $eagle_booking_form_services );
for ($eagle_booking_additional_services_array_i = 0; $eagle_booking_additional_services_array_i < count($eagle_booking_additional_services_array)-1; $eagle_booking_additional_services_array_i++) {
$eagle_booking_service_id = $eagle_booking_additional_services_array[$eagle_booking_additional_services_array_i];
// SERVICE MTB
$eagle_booking_mtb_service_price = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_price', true );
$eagle_booking_mtb_service_price_type_1 = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_price_type', true );
$eagle_booking_mtb_service_price_type_2 = get_post_meta( $eagle_booking_service_id, 'eagle_booking_mtb_service_price_type_2', true );
if ( $eagle_booking_mtb_service_price_type_1 == 'guest' ) {
$eagle_booking_operator_1 = $eagle_booking_form_guests;
} else {
$eagle_booking_operator_1 = 1;
}
if ( $eagle_booking_mtb_service_price_type_2 == 'night' ) {
$eagle_booking_operator_2 = eb_total_booking_nights($eagle_booking_form_date_from, $eagle_booking_form_date_to);
} else {
$eagle_booking_operator_2 = 1;
}
$eagle_booking_additional_service_total_price = $eagle_booking_mtb_service_price*$eagle_booking_operator_1*$eagle_booking_operator_2;
$eagle_booking_form_extra_services .= $eagle_booking_service_id.'['.$eagle_booking_additional_service_total_price.'],';
}
endif;

View File

@@ -0,0 +1,105 @@
<?php
/**
* The Template for the checkout booking details
*
* This template can be overridden by copying it to yourtheme/eb-templates/checkout/details.php.
*
* Author: Eagle Themes
* Package: Eagle-Booking/Templates
* Version: 1.1.6
*/
defined('ABSPATH') || exit;
/**
* Include Stepline
*/
if ( eb_get_option('eb_stepline' ) == true ) include eb_load_template('elements/stepline.php');
?>
<div class="checkout-details eb-g-3">
<h4 class="title"><?php echo esc_html__('Booking Details','eagle-booking') ?></h4>
<div class="checkout-details-inner">
<div><strong><?php echo esc_html__('Full Name','eagle-booking') ?>:</strong> <?php echo $eagle_booking_form_name .' '.$eagle_booking_form_surname ?></div>
<div><strong><?php echo esc_html__('Email','eagle-booking') ?>:</strong> <?php echo $eagle_booking_form_email ?></div>
<div><strong><?php echo esc_html__('Phone','eagle-booking') ?>:</strong> <?php echo $eagle_booking_form_phone ?></div>
<?php if ( eb_get_option('eb_booking_form_fields')['address'] == true && !empty( $eagle_booking_form_address.$eagle_booking_form_zip.$eagle_booking_form_city.$eagle_booking_form_country ) ) : ?>
<div><strong><?php echo esc_html__('Address','eagle-booking') ?>:</strong> <?php echo $eagle_booking_form_address .', '.$eagle_booking_form_zip .', '.$eagle_booking_form_city .', '.$eagle_booking_form_country ?></div>
<?php endif ?>
<div><strong><?php echo esc_html__('Room','eagle-booking') ?>:</strong> <?php echo $eagle_booking_room_title ?></div>
<?php if ( eb_room_branch( $eagle_booking_room_id ) ) : ?>
<div><strong><?php echo esc_html__('Branch','eagle-booking') ?>:</strong> <?php echo eb_room_branch( $eagle_booking_room_id ) ?></div>
<?php endif ?>
<div><strong><?php echo esc_html__('Check In/Out','eagle-booking') ?>:</strong> <?php echo eagle_booking_displayd_date_format($eagle_booking_form_date_from) ?><?php eb_checkin_checkout_time('checkin') ?> &nbsp; → &nbsp; <?php echo eagle_booking_displayd_date_format($eagle_booking_form_date_to) ?><?php eb_checkin_checkout_time('checkout') ?></div>
<div><strong><?php echo esc_html__('Guests','eagle-booking') ?>:</strong>
<?php if ( eb_get_option('eb_adults_children') == true ) : ?>
<?php echo $eagle_booking_form_adults . ' ' .esc_html__('Adults', 'eagle-booking'). ', ' . $eagle_booking_form_children . ' ' .esc_html__('Children', 'eagle-booking') ?>
<?php else : ?>
<?php echo $eagle_booking_form_guests ?>
<?php endif ?>
</div>
<?php if ( eb_get_option('eb_booking_form_fields')['arrival'] == true && $eagle_booking_form_arrival != '') : ?>
<div><strong><?php echo esc_html__('Arrival','eagle-booking') ?> :</strong> <?php echo $eagle_booking_form_arrival ?></div>
<?php endif ?>
<?php if (!empty($eagle_booking_form_services)) : ?>
<div class="checkout-details-services"><strong><?php echo esc_html__('Additional Services','eagle-booking') ?>:</strong>
<?php
if ( !empty($eagle_booking_form_services) ) :
$eagle_booking_services_array = explode(',', $eagle_booking_form_services );
for ($eagle_booking_services_array_i = 0; $eagle_booking_services_array_i < count($eagle_booking_services_array)-1; $eagle_booking_services_array_i++) :
$eagle_booking_service_id = $eagle_booking_services_array[$eagle_booking_services_array_i];
$eagle_booking_service_name = get_the_title($eagle_booking_service_id);
echo $eagle_booking_service_name;
if (next($eagle_booking_services_array )) :
echo ', ';
endif;
endfor;
endif;
?>
</div>
<?php endif ?>
<?php if ( !empty($eagle_booking_form_requests) ) : ?>
<div><strong><?php echo esc_html__('Requests','eagle-booking') ?>:</strong> <?php echo $eagle_booking_form_requests ?></div>
<?php endif ?>
<?php if ( eb_get_option('show_price') == true ) : ?>
<div>
<strong><?php echo esc_html__('Total Price','eagle-booking') ?>:</strong>
<?php echo eb_price( $eagle_booking_form_final_price ) ?>
</div>
<?php endif ?>
<?php if ( eb_get_option('eagle_booking_deposit_amount') < 100 ) : ?>
<div>
<strong><?php echo esc_html__('Deposit Amount','eagle-booking') ?>:</strong>
<?php if ( eb_currency_position() == 'before' ) : ?>
<?php echo eb_currency()?><?php eb_formatted_price($eagle_booking_deposit_amount) ?>
<?php else : ?>
<?php eb_formatted_price($eagle_booking_deposit_amount) ?><?php echo eb_currency()?>
<?php endif ?>
</div>
<?php endif ?>
</div>
</div>

View File

@@ -0,0 +1,34 @@
<?php
/**
* The Template for the payment tabs
*
* This template can be overridden by copying it to yourtheme/eb-templates/checkout/payment.php.
*
* Author: Eagle Themes
* Package: Eagle-Booking/Templates
* Version: 1.1.6
*/
defined('ABSPATH') || exit;
?>
<div class="checkout-payment-tabs">
<h4 class="title"><?php echo esc_html__('Payment Options','eagle-booking') ?></h4>
<ul class="eb-payment-tabs">
<?php
/**
* Include payment tabs
*/
include_once EB_PATH . 'core/admin/gateways/payment-tabs.php';
?>
</ul>
<div class="payment-tabs-content">
<?php
/**
* Include payment caontent
*/
include_once EB_PATH . 'core/admin/gateways/payment-content.php';
?>
</div>
</div>

View File

@@ -0,0 +1,181 @@
<?php
/**
* The Template for the thank you page
*
* This template can be overridden by copying it to yourtheme/eb-templates/checkout/thankyou.php.
*
* Author: Eagle Themes
* Package: Eagle-Booking/Templates
* Version: 1.1.7
*/
defined('ABSPATH') || exit;
/**
* Include Stepline
*/
if ( eb_get_option('eb_stepline' ) == true ) include eb_load_template('elements/stepline.php');
?>
<div id="thankyou-page" class="thankyou-page">
<div class="eb-alert eb-alert-success eb-alert-icon mb50" role="alert"> <?php echo __('Your booking has been submitted successfully.', 'eagle-booking') ?>
<?php if (eb_get_option('eagle_booking_message')['email_guest'] == true) : ?>
<?php echo __('We just sent you a confirmation email to', 'eagle-booking') ?>
<?php echo $eagle_booking_form_email ?>
<?php endif ?>
</div>
<div class="eb-printable eb-thank-details">
<div class="eb-hotel-logo eb-only-printable">
<?php
if (!empty( eb_get_option('hotel_logo') )) {
echo "<img src=".eb_get_option('hotel_logo')." height='20px'>";
} else {
echo get_bloginfo( 'name' );
}
?>
</div>
<h4 class="title"><?php echo __('Booking Details', 'eagle-booking') ?></h4>
<ul>
<li>
<span><?php echo __('Transaction ID', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_transaction_id ?></strong>
</l1>
<li>
<span><?php echo __('Full Name', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_form_name .' '.$eagle_booking_form_surname ?></strong>
</li>
<li>
<span><?php echo __('Email', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_form_email ?></strong>
</li>
<li>
<span><?php echo __('Phone', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_form_phone ?></strong>
</li>
<?php if ( !empty( $eagle_booking_form_address.$eagle_booking_form_zip.$eagle_booking_form_city.$eagle_booking_form_country ) ) : ?>
<li>
<span><?php echo __('Address', 'eagle-booking') ?></span>
<strong> <?php echo $eagle_booking_form_address . ', ' .$eagle_booking_form_zip . ', ' .$eagle_booking_form_city . ', ' . $eagle_booking_form_country ?> </strong>
</li>
<?php endif ?>
<li>
<span><?php echo __('Room', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_room_title ?></strong>
</li>
<?php if ( eb_room_branch( $eagle_booking_room_id ) ) : ?>
<li>
<span><?php echo __('Branch','eagle-booking') ?></span>
<strong><?php echo eb_room_branch( $eagle_booking_room_id ) ?></strong>
</li>
<?php endif ?>
<li>
<span><?php echo __('Check In/Out', 'eagle-booking') ?></span>
<strong><?php echo eagle_booking_displayd_date_format($eagle_booking_form_date_from) ?><?php eb_checkin_checkout_time('checkin') ?> &nbsp; → &nbsp; <?php echo eagle_booking_displayd_date_format($eagle_booking_form_date_to) ?><?php eb_checkin_checkout_time('checkout') ?></strong>
</li>
<li>
<span><?php echo __('Guests','eagle-booking') ?></span>
<strong>
<?php if ( eb_get_option('eb_adults_children') == true ) : ?>
<?php echo $eagle_booking_form_adults . ' ' .__('Adults', 'eagle-booking'). ', ' . $eagle_booking_form_children . ' ' .__('Children', 'eagle-booking') ?>
<?php else : ?>
<?php echo $eagle_booking_form_guests ?>
<?php endif ?>
</strong>
</li>
<?php if ( !empty($eagle_booking_form_arrival)) : ?>
<li>
<span><?php echo __('Arrival', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_form_arrival ?></strong>
</li>
<?php endif ?>
<li>
<span><?php echo __('Payment', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_checkout_payment_type ?></strong>
</li>
<?php if (!empty($eagle_booking_form_services)) : ?>
<li>
<span><?php echo __('Additional Services', 'eagle-booking') ?></span>
<strong>
<?php
$eagle_booking_services_array = explode(',', $eagle_booking_form_services);
for ($eagle_booking_services_array_i = 0; $eagle_booking_services_array_i < count($eagle_booking_services_array)-1; $eagle_booking_services_array_i++) :
$eagle_booking_service_id = $eagle_booking_services_array[$eagle_booking_services_array_i];
$eagle_booking_service_name = get_the_title($eagle_booking_service_id);
echo $eagle_booking_service_name;
if (next($eagle_booking_services_array)) :
echo ', ';
endif;
endfor;
?>
</strong>
</li>
<?php endif ?>
<?php if (!empty($eagle_booking_form_requests)) : ?>
<li>
<span><?php echo __('Requests', 'eagle-booking') ?></span>
<strong><?php echo $eagle_booking_form_requests ?></strong>
</li>
<?php endif ?>
<?php if ( eb_get_option('show_price') == true ) : ?>
<li>
<span><?php echo __('Total Price', 'eagle-booking') ?></span>
<strong>
<?php if (eb_currency_position() == 'before') : ?>
<?php echo eb_currency()?><?php eb_formatted_price($eagle_booking_form_final_price) ?>
<?php else : ?>
<?php eb_formatted_price($eagle_booking_form_final_price) ?><?php echo eb_currency()?>
<?php endif ?>
</strong>
</li>
<?php endif ?>
<?php if ( eb_get_option('eagle_booking_deposit_amount') < 100 ) : ?>
<li>
<span><?php echo __('Deposit Amount','eagle-booking') ?></span>
<strong>
<?php if ( eb_currency_position() == 'before' ) : ?>
<?php echo eb_currency()?><?php eb_formatted_price($eagle_booking_deposit_amount) ?>
<?php else : ?>
<?php eb_formatted_price($eagle_booking_deposit_amount) ?><?php echo eb_currency()?>
<?php endif ?>
</strong>
</li>
<?php endif ?>
</ul>
</div>
<div class="thankyou-buttons">
<?php if ( is_user_logged_in() ) : ?>
<a href="<?php echo eb_account_page() ?>" class="btn eb-btn"><?php echo __('Manage Your Bookings', 'eagle-booking') ?></a>
<?php endif ?>
<a class="btn eb-btn print-booking-details" onClick="window.print()"><?php echo __('Print Booking Details', 'eagle-booking') ?></a>
</div>
</div>