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,27 @@
<?php
namespace Elementor\Modules\KitElementsDefaults\ImportExport;
use Elementor\App\Modules\ImportExport\Processes\Export;
use Elementor\App\Modules\ImportExport\Processes\Import;
use Elementor\Modules\KitElementsDefaults\ImportExport\Runners\Export as Export_Runner;
use Elementor\Modules\KitElementsDefaults\ImportExport\Runners\Import as Import_Runner;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Import_Export {
const FILE_NAME = 'kit-elements-defaults';
public function register() {
// Revert kit is working by default, using the site-settings runner.
add_action( 'elementor/import-export/export-kit', function ( Export $export ) {
$export->register( new Export_Runner() );
} );
add_action( 'elementor/import-export/import-kit', function ( Import $import ) {
$import->register( new Import_Runner() );
} );
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace Elementor\Modules\KitElementsDefaults\ImportExport\Runners;
use Elementor\Modules\KitElementsDefaults\ImportExport\Import_Export;
use Elementor\Plugin;
use Elementor\Core\Utils\Collection;
use Elementor\Modules\KitElementsDefaults\Module;
use Elementor\Modules\KitElementsDefaults\Utils\Settings_Sanitizer;
use Elementor\App\Modules\ImportExport\Runners\Export\Export_Runner_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Export extends Export_Runner_Base {
public static function get_name() : string {
return 'elements-default-values';
}
public function should_export( array $data ) {
// Together with site-settings.
return (
isset( $data['include'] ) &&
in_array( 'settings', $data['include'], true )
);
}
public function export( array $data ) {
$kit = Plugin::$instance->kits_manager->get_active_kit();
if ( ! $kit ) {
return [
'manifest' => [],
'files' => [],
];
}
$default_values = $kit->get_json_meta( Module::META_KEY );
if ( ! $default_values ) {
return [
'manifest' => [],
'files' => [],
];
}
$sanitizer = new Settings_Sanitizer(
Plugin::$instance->elements_manager,
array_keys( Plugin::$instance->widgets_manager->get_widget_types() )
);
$default_values = ( new Collection( $default_values ) )
->map( function ( $settings, $type ) use ( $sanitizer, $kit ) {
return $sanitizer
->for( $type )
->using( $settings )
->remove_invalid_settings()
->kses_deep()
->prepare_for_export( $kit )
->get();
} )
->all();
return [
'files' => [
'path' => Import_Export::FILE_NAME,
'data' => $default_values,
],
];
}
}

View File

@@ -0,0 +1,69 @@
<?php
namespace Elementor\Modules\KitElementsDefaults\ImportExport\Runners;
use Elementor\Modules\KitElementsDefaults\ImportExport\Import_Export;
use Elementor\Plugin;
use Elementor\Core\Utils\Collection;
use Elementor\Modules\KitElementsDefaults\Module;
use Elementor\App\Modules\ImportExport\Utils as ImportExportUtils;
use Elementor\Modules\KitElementsDefaults\Utils\Settings_Sanitizer;
use Elementor\App\Modules\ImportExport\Runners\Import\Import_Runner_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Import extends Import_Runner_Base {
public static function get_name() : string {
return 'elements-default-values';
}
public function should_import( array $data ) {
// Together with site-settings.
return (
isset( $data['include'] ) &&
in_array( 'settings', $data['include'], true ) &&
! empty( $data['site_settings']['settings'] ) &&
! empty( $data['extracted_directory_path'] )
);
}
public function import( array $data, array $imported_data ) {
$kit = Plugin::$instance->kits_manager->get_active_kit();
$file_name = Import_Export::FILE_NAME;
$default_values = ImportExportUtils::read_json_file( "{$data['extracted_directory_path']}/{$file_name}.json" );
if ( ! $kit || ! $default_values ) {
return [];
}
$element_types = array_keys( Plugin::$instance->elements_manager->get_element_types() );
$widget_types = array_keys( Plugin::$instance->widgets_manager->get_widget_types() );
$types = array_merge( $element_types, $widget_types );
$sanitizer = new Settings_Sanitizer(
Plugin::$instance->elements_manager,
$widget_types
);
$default_values = ( new Collection( $default_values ) )
->filter( function ( $settings, $type ) use ( $types ) {
return in_array( $type, $types, true );
} )
->map( function ( $settings, $type ) use ( $sanitizer, $kit ) {
return $sanitizer
->for( $type )
->using( $settings )
->remove_invalid_settings()
->kses_deep()
->prepare_for_import( $kit )
->get();
} )
->all();
$kit->update_json_meta( Module::META_KEY, $default_values );
return $default_values;
}
}