Hotel Raxa Dev 5b1e2453c7 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>
2025-07-11 07:43:22 +02:00

119 lines
2.3 KiB
PHP

<?php
/**
* Reflection module
*
* @link https://contactform7.com/reflection/
*/
add_action( 'wpcf7_init', 'wpcf7_add_form_tag_reflection', 10, 0 );
/**
* Registers reflection-related form-tag types.
*/
function wpcf7_add_form_tag_reflection() {
wpcf7_add_form_tag( 'reflection',
'wpcf7_reflection_form_tag_handler',
array(
'name-attr' => true,
'display-block' => true,
'not-for-mail' => true,
)
);
wpcf7_add_form_tag( 'output',
'wpcf7_output_form_tag_handler',
array(
'name-attr' => true,
'not-for-mail' => true,
)
);
}
/**
* The form-tag handler for the reflection type.
*/
function wpcf7_reflection_form_tag_handler( $tag ) {
if ( empty( $tag->name ) ) {
return '';
}
$values = $tag->values ? $tag->values : array( '' );
if ( ! wpcf7_get_validation_error( $tag->name ) ) {
$hangover = array_filter( (array) wpcf7_get_hangover( $tag->name ) );
if ( $hangover ) {
$values = $hangover;
}
}
$content = array_reduce(
$values,
static function ( $carry, $item ) use ( $tag ) {
$output_tag = sprintf(
'<output %1$s>%2$s</output>',
wpcf7_format_atts( array(
'name' => $tag->name,
'data-default' => $item,
) ),
( '' !== $item ) ? esc_html( $item ) : '&nbsp;'
);
return $carry . $output_tag;
},
''
);
$html = sprintf(
'<fieldset %1$s>%2$s</fieldset>',
wpcf7_format_atts( array(
'data-reflection-of' => $tag->name,
'class' => $tag->get_class_option(
wpcf7_form_controls_class( $tag->type )
),
'id' => $tag->get_id_option(),
) ),
$content
);
return $html;
}
/**
* The form-tag handler for the output type.
*/
function wpcf7_output_form_tag_handler( $tag ) {
if ( empty( $tag->name ) ) {
return '';
}
$value = (string) reset( $tag->values );
if ( ! wpcf7_get_validation_error( $tag->name ) ) {
$hangover = array_filter( (array) wpcf7_get_hangover( $tag->name ) );
if ( $hangover ) {
$value = (string) reset( $hangover );
}
}
$html = sprintf(
'<output %1$s>%2$s</output>',
wpcf7_format_atts( array(
'data-reflection-of' => $tag->name,
'data-default' => $value,
'name' => $tag->name,
'class' => $tag->get_class_option(
wpcf7_form_controls_class( $tag->type )
),
'id' => $tag->get_id_option(),
) ),
esc_html( $value )
);
return $html;
}