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,31 @@
<?php
/**
* Admin UI
*
* @package Envato_Market
* @since 1.0.0
*/
if ( isset( $_GET['action'] ) ) {
$id = ! empty( $_GET['id'] ) ? absint( trim( $_GET['id'] ) ) : '';
if ( 'install-plugin' === $_GET['action'] ) {
Envato_Market_Admin::install_plugin( $id );
} elseif ( 'install-theme' === $_GET['action'] ) {
Envato_Market_Admin::install_theme( $id );
}
} else {
add_thickbox();
?>
<div class="wrap about-wrap full-width-layout">
<?php Envato_Market_Admin::render_intro_partial(); ?>
<?php Envato_Market_Admin::render_tabs_partial(); ?>
<form method="POST" action="<?php echo esc_url( ENVATO_MARKET_NETWORK_ACTIVATED ? network_admin_url( 'edit.php?action=envato_market_network_settings' ) : admin_url( 'options.php' ) ); ?>">
<?php Envato_Market_Admin::render_themes_panel_partial(); ?>
<?php Envato_Market_Admin::render_plugins_panel_partial(); ?>
<?php Envato_Market_Admin::render_settings_panel_partial(); ?>
<?php Envato_Market_Admin::render_help_panel_partial(); ?>
</form>
</div>
<?php
}

View File

@@ -0,0 +1,12 @@
<?php
/**
* Items section
*
* @package Envato_Market
* @since 1.0.0
*/
?>
<p><?php esc_html_e( 'Add Envato Market themes & plugins using multiple OAuth tokens. This is especially useful when an item has been purchased on behalf of a third-party. This works similarly to the global OAuth Personal Token, but for individual items and additionally requires the Envato Market item ID.', 'envato-market' ); ?></p>
<p><?php esc_html_e( 'Warning: These tokens can be revoked by the account holder at any time.', 'envato-market' ); ?></p>

View File

@@ -0,0 +1,30 @@
<?php
/**
* OAuth section
*
* @package Envato_Market
* @since 1.0.0
*/
?>
<p>
<?php printf( esc_html__( 'This area enables WordPress Theme &amp; Plugin updates from Envato Market. Read more about how this process works at %s.', 'envato-market' ), '<a href="https://envato.com/market-plugin/" target="_blank">' . esc_html__( 'envato.com', 'envato-market' ) . '</a>' ); ?>
</p>
<p>
<?php esc_html_e( 'Please follow the steps below:', 'envato-market' ); ?>
</p>
<ol>
<li><?php printf( esc_html__( 'Generate an Envato API Personal Token by %s.', 'envato-market' ), '<a href="' . envato_market()->admin()->get_generate_token_url() . '" target="_blank">' . esc_html__( 'clicking this link', 'envato-market' ) . '</a>' ); ?></li>
<li><?php esc_html_e( 'Name the token eg “My WordPress site”.', 'envato-market' ); ?></li>
<li><?php esc_html_e( 'Ensure the following permissions are enabled:', 'envato-market' ); ?>
<ul>
<li><?php esc_html_e( 'View and search Envato sites', 'envato-market' ); ?></li>
<li><?php esc_html_e( 'Download your purchased items', 'envato-market' ); ?></li>
<li><?php esc_html_e( 'List purchases you\'ve made', 'envato-market' ); ?></li>
</ul>
</li>
<li><?php esc_html_e( 'Copy the token into the box below.', 'envato-market' ); ?></li>
<li><?php esc_html_e( 'Click the "Save Changes" button.', 'envato-market' ); ?></li>
<li><?php esc_html_e( 'A list of purchased Themes &amp; Plugins from Envato Market will appear.', 'envato-market' ); ?></li>
</ol>

View File

@@ -0,0 +1,37 @@
<?php
/**
* Items setting
*
* @package Envato_Market
* @since 1.0.0
*/
$items = envato_market()->get_option( 'items', array() );
?>
<ul id="envato-market-items">
<?php
if ( ! empty( $items ) ) {
foreach ( $items as $key => $item ) {
if ( empty( $item['name'] ) || empty( $item['token'] ) || empty( $item['id'] ) || empty( $item['type'] ) || empty( $item['authorized'] ) ) {
continue;
}
$class = 'success' === $item['authorized'] ? 'is-authorized' : 'not-authorized';
echo '
<li data-id="' . esc_attr( $item['id'] ) . '" class="' . esc_attr( $class ) . '">
<span class="item-name">' . esc_html__( 'ID', 'envato-market' ) . ': ' . esc_html( $item['id'] ) . ' - ' . esc_html( $item['name'] ) . '</span>
<button class="item-delete dashicons dashicons-dismiss">
<span class="screen-reader-text">' . esc_html__( 'Delete', 'envato-market' ) . '</span>
</button>
<input type="hidden" name="' . esc_attr( envato_market()->get_option_name() ) . '[items][' . esc_attr( $key ) . '][name]" value="' . esc_html( $item['name'] ) . '" />
<input type="hidden" name="' . esc_attr( envato_market()->get_option_name() ) . '[items][' . esc_attr( $key ) . '][token]" value="' . esc_html( $item['token'] ) . '" />
<input type="hidden" name="' . esc_attr( envato_market()->get_option_name() ) . '[items][' . esc_attr( $key ) . '][id]" value="' . esc_html( $item['id'] ) . '" />
<input type="hidden" name="' . esc_attr( envato_market()->get_option_name() ) . '[items][' . esc_attr( $key ) . '][type]" value="' . esc_html( $item['type'] ) . '" />
<input type="hidden" name="' . esc_attr( envato_market()->get_option_name() ) . '[items][' . esc_attr( $key ) . '][authorized]" value="' . esc_html( $item['authorized'] ) . '" />
</li>';
}
}
?>
</ul>
<button class="button add-envato-market-item"><?php esc_html_e( 'Add Item', 'envato-market' ); ?></button>

View File

@@ -0,0 +1,12 @@
<?php
/**
* Token setting
*
* @package Envato_Market
* @since 1.0.0
*/
?>
<input type="text" name="<?php echo esc_attr( envato_market()->get_option_name() ); ?>[token]" class="widefat" value="<?php echo esc_html( envato_market()->get_option( 'token' ) ); ?>" autocomplete="off">
<p class="description"><?php esc_html_e( 'Enter your Envato API Personal Token.', 'envato-market' ); ?></p>