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,105 @@
|
||||
<?php
|
||||
/**
|
||||
* Text Field
|
||||
*
|
||||
* @package Redux Framework/Fields
|
||||
* @author Dovy Paukstys & Kevin Provance (kprovance)
|
||||
* @version 4.0.0
|
||||
* @noinspection PhpIgnoredClassAliasDeclaration
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! class_exists( 'Redux_Text', false ) ) {
|
||||
|
||||
/**
|
||||
* Class Redux_Text
|
||||
*/
|
||||
class Redux_Text extends Redux_Field {
|
||||
|
||||
/**
|
||||
* Field Render Function.
|
||||
* Takes the vars and outputs the HTML for the field in the settings
|
||||
*
|
||||
* @since ReduxFramework 1.0.0
|
||||
*/
|
||||
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 );
|
||||
$this->field['class'] .= ' hasOptions ';
|
||||
}
|
||||
|
||||
if ( empty( $this->value ) && ! empty( $this->field['data'] ) && ! empty( $this->field['options'] ) ) {
|
||||
$this->value = $this->field['options'];
|
||||
}
|
||||
|
||||
$qtip_title = isset( $this->field['text_hint']['title'] ) ? 'qtip-title="' . $this->field['text_hint']['title'] . '" ' : '';
|
||||
$qtip_text = isset( $this->field['text_hint']['content'] ) ? 'qtip-content="' . $this->field['text_hint']['content'] . '" ' : '';
|
||||
|
||||
$readonly = ( isset( $this->field['readonly'] ) && $this->field['readonly'] ) ? ' readonly="readonly"' : '';
|
||||
$autocomplete = ( isset( $this->field['autocomplete'] ) && false === $this->field['autocomplete'] ) ? ' autocomplete="off"' : '';
|
||||
|
||||
if ( isset( $this->field['options'] ) && ! empty( $this->field['options'] ) ) {
|
||||
$placeholder = '';
|
||||
|
||||
if ( isset( $this->field['placeholder'] ) ) {
|
||||
$placeholder = $this->field['placeholder'];
|
||||
}
|
||||
|
||||
foreach ( $this->field['options'] as $k => $v ) {
|
||||
if ( ! empty( $placeholder ) ) {
|
||||
$placeholder = ( is_array( $this->field['placeholder'] ) && isset( $this->field['placeholder'][ $k ] ) ) ? ' placeholder="' . esc_attr( $this->field['placeholder'][ $k ] ) . '" ' : '';
|
||||
}
|
||||
|
||||
echo '<div class="input_wrapper">';
|
||||
echo '<label for="' . esc_attr( $this->field['id'] . '-text-' . $k ) . '">' . esc_html( $v ) . '</label> ';
|
||||
|
||||
$value = $this->value[ $k ] ?? '';
|
||||
$value = ! empty( $this->value[ $k ] ) ? $this->value[ $k ] : '';
|
||||
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput
|
||||
echo '<input type="text" id="' . esc_attr( $this->field['id'] . '-text-' . $k ) . '" ' . esc_attr( $qtip_title ) . esc_attr( $qtip_text ) . ' name="' . esc_attr( $this->field['name'] . $this->field['name_suffix'] . '[' . esc_attr( $k ) ) . ']" ' . $placeholder . ' value="' . esc_attr( $value ) . '" class="regular-text ' . esc_attr( $this->field['class'] ) . '" ' . esc_html( $readonly ) . esc_html( $autocomplete ) . '/><br />';
|
||||
echo '</div>';
|
||||
}
|
||||
} else {
|
||||
$placeholder = ( isset( $this->field['placeholder'] ) && ! is_array( $this->field['placeholder'] ) ) ? ' placeholder="' . esc_attr( $this->field['placeholder'] ) . '" ' : '';
|
||||
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput
|
||||
echo '<input ' . esc_attr( $qtip_title ) . esc_attr( $qtip_text ) . 'type="text" id="' . esc_attr( $this->field['id'] ) . '" name="' . esc_attr( $this->field['name'] . $this->field['name_suffix'] ) . '" ' . $placeholder . 'value="' . esc_attr( $this->value ) . '" class="regular-text ' . esc_attr( $this->field['class'] ) . '"' . esc_html( $readonly ) . esc_html( $autocomplete ) . ' />';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue Function.
|
||||
* If this field requires any scripts, or css define this function and register/enqueue the scripts/css
|
||||
*
|
||||
* @since ReduxFramework 3.0.0
|
||||
*/
|
||||
public function enqueue() {
|
||||
if ( $this->parent->args['dev_mode'] ) {
|
||||
wp_enqueue_style(
|
||||
'redux-field-text',
|
||||
Redux_Core::$url . 'inc/fields/text/redux-text.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_Text', 'ReduxFramework_Text' );
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Silence is golden.
|
||||
*
|
||||
* @package Redux Framework
|
||||
*/
|
||||
|
||||
_deprecated_file( 'field_text.php', '4.3', 'class-redux-text.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,11 @@
|
||||
.redux-container-text label { display: block; position: relative; font-size: 12px !important; text-align: left; color: #999; margin: 4px 0 2px 0 !important; cursor: default; top: 5px; width: 100px; }
|
||||
|
||||
.redux-container-text input { clear: left; }
|
||||
|
||||
.redux-container-text .input_wrapper { display: block; position: relative; padding: 0; width: 23%; max-width: 23%; min-width: 70px; float: left; clear: left; height: 57px; -webkit-box-sizing: border-box; box-sizing: border-box; vertical-align: baseline; }
|
||||
|
||||
.wp-customizer .redux-container-text .input_wrapper { width: 100%; max-width: 100%; height: auto; }
|
||||
|
||||
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkdXgtdGV4dC5jc3MiLCJzb3VyY2VzIjpbInJlZHV4LXRleHQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxBQUNJLHFCQURpQixDQUNqQixLQUFLLENBQUMsRUFDRixPQUFPLEVBQUUsS0FBSyxFQUNkLFFBQVEsRUFBRSxRQUFRLEVBQ2xCLFNBQVMsRUFBRSxlQUFlLEVBQzFCLFVBQVUsRUFBRSxJQUFJLEVBQ2hCLEtBQUssRUFBRSxJQUFJLEVBQ1gsTUFBTSxFQUFFLHNCQUFzQixFQUM5QixNQUFNLEVBQUUsT0FBTyxFQUNmLEdBQUcsRUFBRSxHQUFHLEVBQ1IsS0FBSyxFQUFFLEtBQUssR0FDZjs7QUFYTCxBQWFJLHFCQWJpQixDQWFqQixLQUFLLENBQUMsRUFDRixLQUFLLEVBQUUsSUFBSSxHQUNkOztBQWZMLEFBaUJJLHFCQWpCaUIsQ0FpQmpCLGNBQWMsQ0FBQyxFQUNYLE9BQU8sRUFBRSxLQUFLLEVBQ2QsUUFBUSxFQUFFLFFBQVEsRUFDbEIsT0FBTyxFQUFFLENBQUMsRUFDVixLQUFLLEVBQUUsR0FBRyxFQUNWLFNBQVMsRUFBRSxHQUFHLEVBQ2QsU0FBUyxFQUFFLElBQUksRUFDZixLQUFLLEVBQUUsSUFBSSxFQUNYLEtBQUssRUFBRSxJQUFJLEVBQ1gsTUFBTSxFQUFFLElBQUksRUFDWixVQUFVLEVBQUUsVUFBVSxFQUN0QixjQUFjLEVBQUUsUUFBUSxHQUMzQjs7QUFHTCxBQUVRLGNBRk0sQ0FDVixxQkFBcUIsQ0FDakIsY0FBYyxDQUFDLEVBQ1gsS0FBSyxFQUFFLElBQUksRUFDWCxTQUFTLEVBQUUsSUFBSSxFQUNmLE1BQU0sRUFBRSxJQUFJLEdBQ2YifQ== */
|
||||
|
||||
/*# sourceMappingURL=redux-text.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["redux-text.scss","redux-text.css"],"names":[],"mappings":"AAAA,8BAAA,cAaI,ECVI,kBAAkB,EDH1B,0BAiBI,ECZI,gBAAgB,ED2BxB,WACI,EC1BI,8BAA8B,EAC9B,eAAe,EACf,QAAQ,EACR,YAAY,EAAA;;ADVpB,8BCcQ,WAAW,EAAA;;ADdnB,uCCkBQ,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,WAAW,EACX,YAAY,EACZ,8BAAsB,EAAtB,sBAAsB,EACtB,wBAAwB,EAAA;;AAIhC,sDAGY,WAAW,EACX,eAAe,EACf,YAAY,EAAA;;AA7BxB,yiCAAyiC","file":"redux-text.css","sourcesContent":[".redux-container-text {\n label {\n display: block;\n position: relative;\n font-size: 12px !important;\n text-align: left;\n color: #999;\n margin: 4px 0 2px 0 !important;\n cursor: default;\n top: 5px;\n width: 100px;\n }\n\n input {\n clear: left;\n }\n\n .input_wrapper {\n display: block;\n position: relative;\n padding: 0;\n width: 23%;\n max-width: 23%;\n min-width: 70px;\n float: left;\n clear: left;\n height: 57px;\n box-sizing: border-box;\n vertical-align: baseline;\n }\n}\n\n.wp-customizer {\n .redux-container-text {\n .input_wrapper {\n width: 100%;\n max-width: 100%;\n height: auto;\n }\n }\n}\n",".redux-container-text label { display: block; position: relative; font-size: 12px !important; text-align: left; color: #999; margin: 4px 0 2px 0 !important; cursor: default; top: 5px; width: 100px; }\n\n.redux-container-text input { clear: left; }\n\n.redux-container-text .input_wrapper { display: block; position: relative; padding: 0; width: 23%; max-width: 23%; min-width: 70px; float: left; clear: left; height: 57px; -webkit-box-sizing: border-box; box-sizing: border-box; vertical-align: baseline; }\n\n.wp-customizer .redux-container-text .input_wrapper { width: 100%; max-width: 100%; height: auto; }\n\n/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkdXgtdGV4dC5jc3MiLCJzb3VyY2VzIjpbInJlZHV4LXRleHQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxBQUNJLHFCQURpQixDQUNqQixLQUFLLENBQUMsRUFDRixPQUFPLEVBQUUsS0FBSyxFQUNkLFFBQVEsRUFBRSxRQUFRLEVBQ2xCLFNBQVMsRUFBRSxlQUFlLEVBQzFCLFVBQVUsRUFBRSxJQUFJLEVBQ2hCLEtBQUssRUFBRSxJQUFJLEVBQ1gsTUFBTSxFQUFFLHNCQUFzQixFQUM5QixNQUFNLEVBQUUsT0FBTyxFQUNmLEdBQUcsRUFBRSxHQUFHLEVBQ1IsS0FBSyxFQUFFLEtBQUssR0FDZjs7QUFYTCxBQWFJLHFCQWJpQixDQWFqQixLQUFLLENBQUMsRUFDRixLQUFLLEVBQUUsSUFBSSxHQUNkOztBQWZMLEFBaUJJLHFCQWpCaUIsQ0FpQmpCLGNBQWMsQ0FBQyxFQUNYLE9BQU8sRUFBRSxLQUFLLEVBQ2QsUUFBUSxFQUFFLFFBQVEsRUFDbEIsT0FBTyxFQUFFLENBQUMsRUFDVixLQUFLLEVBQUUsR0FBRyxFQUNWLFNBQVMsRUFBRSxHQUFHLEVBQ2QsU0FBUyxFQUFFLElBQUksRUFDZixLQUFLLEVBQUUsSUFBSSxFQUNYLEtBQUssRUFBRSxJQUFJLEVBQ1gsTUFBTSxFQUFFLElBQUksRUFDWixVQUFVLEVBQUUsVUFBVSxFQUN0QixjQUFjLEVBQUUsUUFBUSxHQUMzQjs7QUFHTCxBQUVRLGNBRk0sQ0FDVixxQkFBcUIsQ0FDakIsY0FBYyxDQUFDLEVBQ1gsS0FBSyxFQUFFLElBQUksRUFDWCxTQUFTLEVBQUUsSUFBSSxFQUNmLE1BQU0sRUFBRSxJQUFJLEdBQ2YifQ== */\n\n/*# sourceMappingURL=redux-text.css.map */\n"]}
|
||||
@@ -0,0 +1,41 @@
|
||||
.redux-container-text {
|
||||
label {
|
||||
display: block;
|
||||
position: relative;
|
||||
font-size: 12px !important;
|
||||
text-align: left;
|
||||
color: #999;
|
||||
margin: 4px 0 2px 0 !important;
|
||||
cursor: default;
|
||||
top: 5px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
input {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.input_wrapper {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 0;
|
||||
width: 23%;
|
||||
max-width: 23%;
|
||||
min-width: 70px;
|
||||
float: left;
|
||||
clear: left;
|
||||
height: 57px;
|
||||
box-sizing: border-box;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
|
||||
.wp-customizer {
|
||||
.redux-container-text {
|
||||
.input_wrapper {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user