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,82 @@
<?php
/**
* Gallery 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_Gallery', false ) ) {
/**
* Main Redux_gallery class
*
* @since 3.0.0
*/
class Redux_Gallery 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() {
echo '<div class="screenshot">';
if ( ! empty( $this->value ) ) {
$ids = explode( ',', $this->value );
foreach ( $ids as $attachment_id ) {
$img = wp_get_attachment_image_src( $attachment_id );
$alt = wp_prepare_attachment_for_js( $attachment_id );
$alt = $alt['alt'] ?? '';
echo '<a class="of-uploaded-image" href="' . esc_url( $img[0] ) . '">';
echo '<img class="redux-option-image" id="image_' . esc_attr( $this->field['id'] ) . '_' . esc_attr( $attachment_id ) . '" src="' . esc_url( $img[0] ) . '" alt="' . esc_attr( $alt ) . '" target="_blank" rel="external" />';
echo '</a>';
}
}
echo '</div>';
echo '<a href="#" onclick="return false;" id="edit-gallery" class="gallery-attachments button button-primary">' . esc_html__( 'Add/Edit Gallery', 'redux-framework' ) . '</a> ';
echo '<a href="#" onclick="return false;" id="clear-gallery" class="gallery-attachments button">' . esc_html__( 'Clear Gallery', 'redux-framework' ) . '</a>';
echo '<input type="hidden" class="gallery_values ' . esc_attr( $this->field['class'] ) . '" value="' . esc_attr( $this->value ) . '" name="' . esc_attr( $this->field['name'] . $this->field['name_suffix'] ) . '" />';
}
/**
* 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 ( function_exists( 'wp_enqueue_media' ) ) {
wp_enqueue_media();
} else {
wp_enqueue_script( 'media-upload' );
wp_enqueue_script( 'thickbox' );
wp_enqueue_style( 'thickbox' );
}
wp_enqueue_script(
'redux-field-gallery',
Redux_Core::$url . 'inc/fields/gallery/redux-gallery' . Redux_Functions::is_min() . '.js',
array( 'jquery', 'redux-js' ),
$this->timestamp,
true
);
}
}
}
class_alias( 'Redux_Gallery', 'ReduxFramework_Gallery' );

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
_deprecated_file( 'field_gallery.php', '4.3', 'class-redux-gallery.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,141 @@
/* global redux_change, wp, redux */
(function( $ ) {
'use strict';
redux.field_objects = redux.field_objects || {};
redux.field_objects.gallery = redux.field_objects.gallery || {};
redux.field_objects.gallery.init = function( selector ) {
selector = $.redux.getSelector( selector, 'gallery' );
$( 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;
}
// When the user clicks on the Add/Edit gallery button, we need to display the gallery editing.
el.on(
{
click: function( event ) {
var current_gallery;
var final;
var val;
var frame;
var uploader;
var spinner;
var inline;
// Hide gallery settings used for posts/pages.
wp.media.view.Settings.Gallery = wp.media.view.Settings.Gallery.extend(
{
template: function() {
return;
}
}
);
current_gallery = $( this ).closest( 'fieldset' );
if ( 'clear-gallery' === event.currentTarget.id ) {
// Remove value from input.
current_gallery.find( '.gallery_values' ).val( '' );
// Remove preview images.
current_gallery.find( '.screenshot' ).html( '' );
return;
}
// Make sure the media gallery API exists.
if ( 'undefined' === typeof wp || ! wp.media || ! wp.media.gallery ) {
return;
}
event.preventDefault();
// Activate the media editor.
val = current_gallery.find( '.gallery_values' ).val();
if ( ! val ) {
final = '[gallery ids="0"]';
} else {
final = '[gallery ids="' + val + '"]';
}
frame = wp.media.gallery.edit( final );
if ( ! val ) {
uploader = $( 'body' ).find( '#' + frame.el.id );
inline = uploader.find( '.uploader-inline' );
spinner = uploader.find( '.media-toolbar .spinner' );
setTimeout(
function() {
if ( inline.hasClass( 'hidden' ) ) {
inline.removeClass( 'hidden' );
spinner.removeClass( 'is-active' );
}
},
400
);
}
// When the gallery-edit state is updated, copy the attachment ids across.
frame.state( 'gallery-edit' ).on(
'update',
function( selection ) {
var ids;
var element;
var preview_img;
var preview_html = '';
// Clear screenshot div so we can append new selected images.
current_gallery.find( '.screenshot' ).html( '' );
ids = selection.models.map(
function( e ) {
element = e.toJSON();
preview_img = ( 'undefined' !== typeof element.sizes && 'undefined' !== typeof element.sizes.thumbnail ) ? element.sizes.thumbnail.url : element.url;
preview_html = '<a class="of-uploaded-image" href="' + preview_img + '"><img class="redux-option-image" src="' + preview_img + '" alt="" /></a>';
current_gallery.find( '.screenshot' ).append( preview_html );
return e.id;
}
);
current_gallery.find( '.gallery_values' ).val( ids.join( ',' ) );
redux_change( current_gallery.find( '.gallery_values' ) );
frame.detach();
}
);
return false;
}
},
'.gallery-attachments'
);
}
);
};
})( jQuery );

View File

@@ -0,0 +1 @@
!function(n){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.gallery=redux.field_objects.gallery||{},redux.field_objects.gallery.init=function(e){e=n.redux.getSelector(e,"gallery"),n(e).each(function(){var e=n(this),i=e;(i=e.hasClass("redux-field-container")?i:e.parents(".redux-field-container:first")).is(":hidden")||i.hasClass("redux-field-init")&&(i.removeClass("redux-field-init"),e.on({click:function(e){var l,a,i,t,d;if(wp.media.view.Settings.Gallery=wp.media.view.Settings.Gallery.extend({template:function(){}}),l=n(this).closest("fieldset"),"clear-gallery"===e.currentTarget.id)l.find(".gallery_values").val(""),l.find(".screenshot").html("");else if("undefined"!=typeof wp&&wp.media&&wp.media.gallery)return e.preventDefault(),i=(e=l.find(".gallery_values").val())?'[gallery ids="'+e+'"]':'[gallery ids="0"]',a=wp.media.gallery.edit(i),e||(i=n("body").find("#"+a.el.id),d=i.find(".uploader-inline"),t=i.find(".media-toolbar .spinner"),setTimeout(function(){d.hasClass("hidden")&&(d.removeClass("hidden"),t.removeClass("is-active"))},400)),a.state("gallery-edit").on("update",function(e){var i;l.find(".screenshot").html(""),e=e.models.map(function(e){return i=e.toJSON(),i=(void 0!==i.sizes&&void 0!==i.sizes.thumbnail?i.sizes.thumbnail:i).url,i='<a class="of-uploaded-image" href="'+i+'"><img class="redux-option-image" src="'+i+'" alt="" /></a>',l.find(".screenshot").append(i),e.id}),l.find(".gallery_values").val(e.join(",")),redux_change(l.find(".gallery_values")),a.detach()}),!1}},".gallery-attachments"))})}}(jQuery);