Files

114 lines
5.4 KiB
PHP
Raw Permalink Normal View History

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
<?php
/**
* Sidebar generator custom field created for Redux Framework
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Don't duplicate me!
if ( ! class_exists( 'ReduxFramework_sidgen' ) ) {
/**
* Main ReduxFramework_sidgen class
*
*/
class ReduxFramework_sidgen {
/**
* Field Constructor.
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @return void
*/
function __construct( $field = array(), $value = '', $parent ) {
$this->parent = $parent;
$this->field = $field;
$this->value = $value;
}
public function render() {
$this->add_text = ( isset( $this->field['add_text'] ) ) ? $this->field['add_text'] : esc_html__( 'Add New Field', 'eagle-booking' );
echo '<ul id="' . $this->field['id'] . '-ul" class="redux-multi-text">';
if ( isset( $this->value ) && is_array( $this->value ) ) {
foreach ( $this->value as $k => $value ) {
if ( $k != 'lastkey') {
echo '
<li style="position: relative; max-width: 1000px; margin-bottom: 10px !important; padding: 20px; border: 1px solid #ebebeb;">
<div style="padding: 10px 0">
<label style="margin-right: 10px !important; min-width: 100px;">ID</label>
<input type="text" id="' . $this->field['id'] . '-' . $k . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '['.$k.']' . '" value="' . esc_attr( $value ) . '" class="regular-text ' . $this->field['class'] . '" />
</div>
<div style="padding: 10px 0">
<label style="margin-right: 10px !important; min-width: 100px;">Label</label>
<input type="text" id="' . $this->field['id'] . '-' . $k . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '['.$k.']' . '" value="' . esc_attr( $value ) . '" class="regular-text ' . $this->field['class'] . '" />
</div>
<div style="padding: 10px 0">
<label style="margin-right: 10px !important; min-width: 100px;">Required</label>
<input type="checkbox" id="' . $this->field['id'] . '" name="" value="Required" class="regular-text" />
</div>
<div style="padding: 10px 0">
<label style="margin-right: 10px !important; min-width: 100px;">Type</label>
<select>
<option> Text </option>
<option> Checkbox </option>
</select>
</div>
<div style="position: absolute; right: 20px; top: 20px;">
<a href="javascript:void(0);" class="deletion redux-multi-text-remove"><i class="el el-trash-alt"></i></a>
</div>
</li>';
} else {
$lastkey = $value;
}
}
} else {
$lastkey = 0;
}
// echo '<input type="text" value="'. esc_html__( 'Surname', 'eagle-booking' ) .'" class="regular-text" disabled>';
// echo '<input type="text" value="'. esc_html__( 'Email Adress', 'eagle-booking' ) .'" class="regular-text" disabled>';
// echo '<input type="text" value="'. esc_html__( 'Address', 'eagle-booking' ) .'" class="regular-text" disabled>';
// echo '<input type="text" value="'. esc_html__( 'Name', 'eagle-booking' ) .'" class="regular-text" disabled>';
echo '<li>
<input type="text" id="' . $this->field['id'] . '" name="" value="" class="regular-text" style="margin-bottom: 20px" />
Is Required? <input type="checkbox" id="">
<a href="javascript:void(0);" class="deletion redux-multi-text-remove"> <i class="el el-remove-sign"></i></a></li>';
echo '</ul>';
echo '<span style="clear:both;display:block;height:0;" /></span>';
echo '<a href="javascript:void(0);" class="button button-secondary redux-multi-text-add" data-id="' . $this->field['id'] . '-ul" data-name="' . $this->field['name'] . $this->field['name_suffix'] . '">' . $this->add_text . '</a>';
echo '<input type="hidden" class="lastkey" name="' . $this->field['name'] . $this->field['name_suffix'] . '[lastkey]'.'" value="' . esc_attr( $lastkey ) . '">';
}
/**
* Enqueue Function.
* If this field requires any scripts, or css define this function and register/enqueue the scripts/css
*
* @since 1.0
* @return void
*/
public function enqueue() {
wp_enqueue_script(
'redux-field-sidgen-js',
EB_URL . '/include/redux-custom/dynamic-field.js',
array( 'jquery', 'redux-js' ),
time(),
true
);
}
}
}