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:
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* Background Field.
|
||||
*
|
||||
* @package ReduxFramework/Fields
|
||||
* @author Kevin Provance (kprovance)
|
||||
* @version 4.0.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! class_exists( 'Redux_Palette', false ) ) {
|
||||
|
||||
/**
|
||||
* Class Redux_Palette
|
||||
*/
|
||||
class Redux_Palette 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 ( ! isset( $this->field['palettes'] ) && empty( $this->field['palettes'] ) ) {
|
||||
echo 'No palettes have been set.';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div id="' . esc_attr( $this->field['id'] ) . '" class="buttonset">';
|
||||
|
||||
foreach ( $this->field['palettes'] as $value => $color_set ) {
|
||||
$checked = checked( $this->value, $value, false );
|
||||
|
||||
echo '<input
|
||||
type="radio"
|
||||
value="' . esc_attr( $value ) . '"
|
||||
name="' . esc_attr( $this->field['name'] . $this->field['name_suffix'] ) . '"
|
||||
class="redux-palette-set ' . esc_attr( $this->field['class'] ) . '"
|
||||
id="' . esc_attr( $this->field['id'] . '-' . $value ) . '"' . esc_html( $checked ) . '>';
|
||||
|
||||
echo '<label for="' . esc_attr( $this->field['id'] . '-' . $value ) . '">';
|
||||
|
||||
foreach ( $color_set as $color ) {
|
||||
echo '<span style=background:' . esc_attr( $color ) . '>' . esc_attr( $color ) . '</span>';
|
||||
}
|
||||
|
||||
echo '</label>';
|
||||
echo '</input>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
$min = Redux_Functions::is_min();
|
||||
|
||||
wp_enqueue_script(
|
||||
'redux-field-palette',
|
||||
Redux_Core::$url . 'inc/fields/palette/redux-palette' . $min . '.js',
|
||||
array( 'jquery', 'redux-js', 'jquery-ui-button', 'jquery-ui-core' ),
|
||||
$this->timestamp,
|
||||
true
|
||||
);
|
||||
|
||||
if ( $this->parent->args['dev_mode'] ) {
|
||||
wp_enqueue_style(
|
||||
'redux-field-palette',
|
||||
Redux_Core::$url . 'inc/fields/palette/redux-palette.css',
|
||||
array(),
|
||||
$this->timestamp
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable output_variables to be generated.
|
||||
*
|
||||
* @since 4.0.3
|
||||
* @return void
|
||||
*/
|
||||
public function output_variables() {
|
||||
// No code needed, just defining the method is enough.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( 'Redux_Palette', 'ReduxFramework_Palette' );
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
_deprecated_file( 'field_palette.php', '4.3', 'class-redux-palette.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.' );
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
echo null;
|
||||
@@ -0,0 +1,17 @@
|
||||
.redux-container-palette label { border: 3px solid transparent; border-radius: 0; width: 100% !important; display: block; }
|
||||
|
||||
.redux-container-palette label.ui-button.ui-widget { width: 95%; background: none; padding: 0; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
|
||||
|
||||
.redux-container-palette label.ui-button.ui-widget .ui-checkboxradio-icon, .redux-container-palette label.ui-button.ui-widget .ui-checkboxradio-icon-space { display: none; }
|
||||
|
||||
.redux-container-palette label.ui-button.ui-widget span { padding: 10px; -webkit-box-flex: 1; -webkit-flex-grow: 1; -ms-flex-positive: 1; flex-grow: 1; font-size: 0; line-height: 10px; color: rgba(0, 0, 0, 0); -webkit-transition: all 200ms ease-in-out; transition: all 200ms ease-in-out; }
|
||||
|
||||
.redux-container-palette label.ui-button.ui-widget span:hover { -webkit-box-flex: 3; -webkit-flex-grow: 3; -ms-flex-positive: 3; flex-grow: 3; font-weight: bold; min-width: 60px; font-size: 12px; line-height: 10px; color: #333; text-shadow: 0 0 8px #fff, 0 0 8px #fff; }
|
||||
|
||||
.redux-container-palette label.ui-state-active { border: 3px solid #333 !important; }
|
||||
|
||||
.wp-customizer .redux-main .redux-container-palette label { margin-bottom: 3px; }
|
||||
|
||||
/*# sourceMappingURL=data:application/json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UJBQXFCLEVBQ3BDLFVBQVUsRUFBRSxxQkFBcUIsR0FVcEM7O0FBckNiLEFBNEJnQix3QkE1QlEsQ0FDcEIsS0FBSyxBQUtBLFVBQVUsQUFBQSxVQUFVLENBV2pCLElBQUksQUFXQyxNQUFNLENBQUMsRUFDSixTQUFTLEVBQUUsQ0FBQyxFQUNaLFdBQVcsRUFBRSxJQUFJLEVBQ2pCLFNBQVMsRUFBRSxJQUFJLEVBQ2YsU0FBUyxFQUFFLElBQUksRUFDZixXQUFXLEVBQUUsSUFBSSxFQUNqQixLQUFLLEVBQUUsSUFBSSxFQUNYLFdBQVcsRUFBRSwwQkFBMEIsR0FDMUM7O0FBcENqQixBQXdDUSx3QkF4Q2dCLENBQ3BCLEtBQUssQUF1Q0EsZ0JBQWdCLENBQUMsRUFDZCxNQUFNLEVBQUUseUJBQXlCLEdBQ3BDOztBQUlULEFBQ0ksY0FEVSxDQUNWLFdBQVcsQ0FBQyx3QkFBd0IsQ0FBQyxLQUFLLENBQUMsRUFDdkMsYUFBYSxFQUFFLEdBQUcsR0FDckIifQ== */
|
||||
|
||||
/*# sourceMappingURL=redux-palette.css.map */
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Field Palette (color)
|
||||
*/
|
||||
|
||||
/*global jQuery, redux*/
|
||||
|
||||
(function( $ ) {
|
||||
'use strict';
|
||||
|
||||
redux.field_objects = redux.field_objects || {};
|
||||
redux.field_objects.palette = redux.field_objects.palette || {};
|
||||
|
||||
redux.field_objects.palette.init = function( selector ) {
|
||||
selector = $.redux.getSelector( selector, 'palette' );
|
||||
|
||||
$( 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( '.buttonset' ).each(
|
||||
function() {
|
||||
$( this ).controlgroup();
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
};
|
||||
})( jQuery );
|
||||
1
wp-content/plugins/eagle-booking/include/redux/inc/fields/palette/redux-palette.min.js
vendored
Normal file
1
wp-content/plugins/eagle-booking/include/redux/inc/fields/palette/redux-palette.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(i){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.palette=redux.field_objects.palette||{},redux.field_objects.palette.init=function(e){e=i.redux.getSelector(e,"palette"),i(e).each(function(){var e=i(this),t=e;(t=e.hasClass("redux-field-container")?t:e.parents(".redux-field-container:first")).is(":hidden")||t.hasClass("redux-field-init")&&(t.removeClass("redux-field-init"),e.find(".buttonset").each(function(){i(this).controlgroup()}))})}}(jQuery);
|
||||
@@ -0,0 +1,52 @@
|
||||
.redux-container-palette {
|
||||
label {
|
||||
border: 3px solid transparent;
|
||||
border-radius: 0;
|
||||
width: 100% !important;
|
||||
display: block;
|
||||
&.ui-button.ui-widget {
|
||||
width: 95%;
|
||||
background: none;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
|
||||
.ui-checkboxradio-icon,
|
||||
.ui-checkboxradio-icon-space {
|
||||
display:none;
|
||||
}
|
||||
|
||||
span {
|
||||
padding: 10px;
|
||||
flex-grow: 1;
|
||||
font-size: 0;
|
||||
line-height: 10px;
|
||||
color: rgba(0, 0, 0, 0);
|
||||
-webkit-transition: all 200ms ease-in-out;
|
||||
-moz-transition: all 200ms ease-in-out;
|
||||
-ms-transition: all 200ms ease-in-out;
|
||||
-o-transition: all 200ms ease-in-out;
|
||||
transition: all 200ms ease-in-out;
|
||||
&:hover {
|
||||
flex-grow: 3;
|
||||
font-weight: bold;
|
||||
min-width: 60px;
|
||||
font-size: 12px;
|
||||
line-height: 10px;
|
||||
color: #333;
|
||||
text-shadow: 0 0 8px #fff, 0 0 8px #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.ui-state-active {
|
||||
border: 3px solid #333 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wp-customizer {
|
||||
.redux-main .redux-container-palette label {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user