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,146 @@
<?php
/**
* Checkbox Field.
*
* @package ReduxFramework/Fields
* @author Dovy Paukstys & Kevin Provance (kprovance)
* @version 4.0.0
*/
defined( 'ABSPATH' ) || exit;
// Don't duplicate me!
if ( ! class_exists( 'Redux_Checkbox', false ) ) {
/**
* Main Redux_checkbox class
*
* @since 1.0.0
*/
class Redux_Checkbox extends Redux_Field {
/**
* Field Render Function.
* Takes the vars and outputs the HTML for the field in the settings
*
* @since 1.0.0
* @access public
* @return void
*/
public function render() {
if ( ! empty( $this->field['data'] ) && empty( $this->field['options'] ) ) {
if ( empty( $this->field['args'] ) ) {
$this->field['args'] = array();
}
$this->field['options'] = $this->parent->wordpress_data->get( $this->field['data'], $this->field['args'], $this->parent->args['opt_name'], $this->value );
if ( empty( $this->field['options'] ) ) {
return;
}
}
$this->field['data_class'] = ( isset( $this->field['multi_layout'] ) ) ? 'data-' . $this->field['multi_layout'] : 'data-full';
if ( ! empty( $this->field['options'] ) && ( is_array( $this->field['options'] ) || is_array( $this->field['default'] ) ) ) {
echo '<ul class="' . esc_attr( $this->field['data_class'] ) . '">';
if ( ! isset( $this->value ) ) {
$this->value = array();
}
if ( ! is_array( $this->value ) ) {
$this->value = array();
}
if ( empty( $this->field['options'] ) && isset( $this->field['default'] ) && is_array( $this->field['default'] ) ) {
$this->field['options'] = $this->field['default'];
}
foreach ( $this->field['options'] as $k => $v ) {
if ( empty( $this->value[ $k ] ) ) {
$this->value[ $k ] = '';
}
echo '<li>';
$ident_1 = strtr(
$this->parent->args['opt_name'] . '[' . $this->field['id'] . '][' . $k . ']',
array(
'[' => '_',
']' => '',
)
);
$ident_2 = array_search( $k, array_keys( $this->field['options'] ), true );
$id = $ident_1 . '_' . $ident_2;
echo '<label for="' . esc_attr( $id ) . '">';
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . esc_attr( $this->field['name'] . $this->field['name_suffix'] . '[' . $k . ']' ) . '" value="' . esc_attr( $this->value[ $k ] ) . '"/>';
echo '<input type="checkbox" class="checkbox ' . esc_attr( $this->field['class'] ) . '" id="' . esc_attr( $id ) . '" value="1" ' . checked( $this->value[ $k ], '1', false ) . '/>';
echo ' ' . esc_attr( $v ) . '</label>';
echo '</li>';
}
echo '</ul>';
} elseif ( empty( $this->field['data'] ) ) {
echo '<ul class="data-full">';
echo '<li>';
if ( ! empty( $this->field['label'] ) ) {
echo '<label>';
}
$ident_1 = strtr(
$this->parent->args['opt_name'] . '[' . $this->field['id'] . ']',
array(
'[' => '_',
']' => '',
)
);
// Got the "Checked" status as "0" or "1" then insert it as the "value" option.
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . esc_attr( $this->field['name'] . $this->field['name_suffix'] ) . '" value="' . esc_attr( $this->value ) . '"/>';
echo '<input type="checkbox" id="' . esc_attr( $ident_1 ) . '" value="1" class="checkbox ' . esc_attr( $this->field['class'] ) . '" ' . checked( $this->value, '1', false ) . '/>';
if ( ! empty( $this->field['label'] ) ) {
echo ' ' . esc_html( $this->field['label'] );
echo '</label>';
}
echo '</li>';
echo '</ul>';
}
}
/**
* Enqueue Function.
* If this field requires any scripts, or css define this function and register/enqueue the scripts/css
*
* @since 1.0.0
* @access public
* @return void
*/
public function enqueue() {
if ( $this->parent->args['dev_mode'] ) {
wp_enqueue_style(
'redux-field-checkbox',
Redux_Core::$url . 'inc/fields/checkbox/redux-checkbox.css',
array(),
$this->timestamp
);
}
wp_enqueue_script(
'redux-field-checkbox',
Redux_Core::$url . 'inc/fields/checkbox/redux-checkbox' . Redux_Functions::is_min() . '.js',
array( 'jquery', 'redux-js' ),
$this->timestamp,
true
);
}
}
}
class_alias( 'Redux_Checkbox', 'ReduxFramework_Checkbox' );

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
_deprecated_file( 'field_checkbox.php', '4.3', 'class-redux-checkbox.php', 'This file has been renamed and is no longer used in Redux 4. Please change any references to it as it will be removed in future versions of Redux.' );

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,7 @@
.redux-container-checkbox label { vertical-align: top; width: 100%; }
.redux-container-checkbox label .field-desc { margin-top: 0; float: left; width: 93%; clear: none; }
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkdXgtY2hlY2tib3guY3NzIiwic291cmNlcyI6WyJyZWR1eC1jaGVja2JveC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLEFBQ0kseUJBRHFCLENBQ3JCLEtBQUssQ0FBQyxFQUNGLGNBQWMsRUFBRSxHQUFHLEVBQ25CLEtBQUssRUFBRSxJQUFJLEdBUWQ7O0FBWEwsQUFLUSx5QkFMaUIsQ0FDckIsS0FBSyxDQUlELFdBQVcsQ0FBQyxFQUNSLFVBQVUsRUFBRSxDQUFDLEVBQ2IsS0FBSyxFQUFFLElBQUksRUFDWCxLQUFLLEVBQUUsR0FBRyxFQUNWLEtBQUssRUFBRSxJQUFJLEdBQ2QifQ== */
/*# sourceMappingURL=redux-checkbox.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"sources":["redux-checkbox.scss","redux-checkbox.css"],"names":[],"mappings":"AAAA,kCAAA,mBACI,ECEI,WAAW,EAAA;;ADHnB,8CCMY,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EAAA;;AALvB,6dAA6d","file":"redux-checkbox.css","sourcesContent":[".redux-container-checkbox {\r\n label {\r\n vertical-align: top;\r\n width: 100%;\r\n\r\n .field-desc {\r\n margin-top: 0;\r\n float: left;\r\n width: 93%;\r\n clear: none;\r\n }\r\n }\r\n}\r\n",".redux-container-checkbox label { vertical-align: top; width: 100%; }\n\n.redux-container-checkbox label .field-desc { margin-top: 0; float: left; width: 93%; clear: none; }\n\n/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkdXgtY2hlY2tib3guY3NzIiwic291cmNlcyI6WyJyZWR1eC1jaGVja2JveC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLEFBQ0kseUJBRHFCLENBQ3JCLEtBQUssQ0FBQyxFQUNGLGNBQWMsRUFBRSxHQUFHLEVBQ25CLEtBQUssRUFBRSxJQUFJLEdBUWQ7O0FBWEwsQUFLUSx5QkFMaUIsQ0FDckIsS0FBSyxDQUlELFdBQVcsQ0FBQyxFQUNSLFVBQVUsRUFBRSxDQUFDLEVBQ2IsS0FBSyxFQUFFLElBQUksRUFDWCxLQUFLLEVBQUUsR0FBRyxFQUNWLEtBQUssRUFBRSxJQUFJLEdBQ2QifQ== */\n\n/*# sourceMappingURL=redux-checkbox.css.map */\n"]}

View File

@@ -0,0 +1,55 @@
/**
* Redux Checkbox
* Dependencies : jquery
* Feature added by : Dovy Paukstys
* Date : 17 June 2014
*/
/*global redux_change, redux*/
(function( $ ) {
'use strict';
redux.field_objects = redux.field_objects || {};
redux.field_objects.checkbox = redux.field_objects.checkbox || {};
redux.field_objects.checkbox.init = function( selector ) {
selector = $.redux.getSelector( selector, 'checkbox' );
$( selector ).each(
function() {
var el = $( this );
var parent = el;
if ( ! el.hasClass( 'redux-field-container' ) ) {
parent = el.parents( '.redux-field-container:first' );
}
if ( parent.is( ':hidden' ) ) {
return;
}
if ( parent.hasClass( 'redux-field-init' ) ) {
parent.removeClass( 'redux-field-init' );
} else {
return;
}
el.find( '.checkbox' ).on(
'click',
function() {
var val = 0;
if ( $( this ).is( ':checked' ) ) {
val = $( this ).parent().find( '.checkbox-check' ).attr( 'data-val' );
}
$( this ).parent().find( '.checkbox-check' ).val( val );
redux_change( $( this ) );
}
);
}
);
};
})( jQuery );

View File

@@ -0,0 +1 @@
!function(i){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.checkbox=redux.field_objects.checkbox||{},redux.field_objects.checkbox.init=function(e){e=i.redux.getSelector(e,"checkbox"),i(e).each(function(){var e=i(this),c=e;(c=e.hasClass("redux-field-container")?c:e.parents(".redux-field-container:first")).is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),e.find(".checkbox").on("click",function(){var e=0;i(this).is(":checked")&&(e=i(this).parent().find(".checkbox-check").attr("data-val")),i(this).parent().find(".checkbox-check").val(e),redux_change(i(this))}))})}}(jQuery);

View File

@@ -0,0 +1,13 @@
.redux-container-checkbox {
label {
vertical-align: top;
width: 100%;
.field-desc {
margin-top: 0;
float: left;
width: 93%;
clear: none;
}
}
}