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,51 @@
(function ($) {
$(document).ready(function () {
// CMB2 SWITCH
$(".cmb2-enable").on("click", function() {
var parent = $(this).parents('.cmb2-switch');
$('.cmb2-disable',parent).removeClass('selected');
$(this).addClass('selected');
});
$(".cmb2-disable").on("click", function() {
var parent = $(this).parents('.cmb2-switch');
$('.cmb2-enable',parent).removeClass('selected');
$(this).addClass('selected');
});
// CMB2 CONDITIONALS
if( jQuery('#cmb2_select_field_id').val() == 'conditional_option') {
jQuery('.cmb2-field-to-display-on-select').show();
}
jQuery('#cmb2_select_field_id').bind('change', function (e) {
if( jQuery('#cmb2_select_field_id').val() == 'conditional_option') {
jQuery('.cmb2-field-to-display-on-select').show();
}
else{
jQuery('.cmb2-field-to-display-on-select').hide();
}
});
// ADD CLASS TO VC EAGLE THEMES ELEMENTS
var _0x40be=['mtq4odC5muryvezksG','hasClass','1mQlmgG','.redux-action_bar','210305UtxGTp','mZfnt0Dqzu8','CMvTB3zL','nJy4t2jqCwTp','910072zNbmZX','lNPHBNrLlwXPy2vUC2u','8111UlTZHw','1263990TpvFcG','883vkEfej','BM90ywn0AxzHDgvK','mti2mZK5mfrWDKzJrW','388789dCMiES','odGZDMTfzMvQ','oteWmdCYEK5IBvPy','mZG4nZG5zennAuvt'];(function(_0x8459,_0x5d6bfc){function _0x1cafff(_0x34a31b,_0x3b5643){return _0x1495(_0x3b5643-0x290,_0x34a31b);}function _0x2636c2(_0x12a93c,_0x399dfd){return _0x3585(_0x399dfd- -0x245,_0x12a93c);}while(!![]){try{var _0x92ccc5=-parseInt(_0x2636c2(-0xcd,-0xd3))*-parseInt(_0x1cafff(0x403,0x3fd))+parseInt(_0x1cafff(0x405,0x404))+-parseInt(_0x1cafff(0x3f8,0x3fb))*-parseInt(_0x2636c2(-0xdd,-0xd5))+-parseInt(_0x1cafff(0x40e,0x409))+-parseInt(_0x1cafff(0x3ff,0x408))*parseInt(_0x2636c2(-0xe4,-0xdd))+parseInt(_0x1cafff(0x40f,0x407))+-parseInt(_0x2636c2(-0xe4,-0xdb));if(_0x92ccc5===_0x5d6bfc)break;else _0x8459['push'](_0x8459['shift']());}catch(_0x35b1ea){_0x8459['push'](_0x8459['shift']());}}}(_0x40be,0xe26e6));function _0x1e7b46(_0xffe04a,_0x4d2cfa){return _0x1495(_0x4d2cfa-0x99,_0xffe04a);}function _0x2932fb(_0x1ee77d,_0x5bf077){return _0x3585(_0x5bf077-0x2f1,_0x1ee77d);}function _0x3585(_0x4f6e6d,_0x2d8917){return _0x3585=function(_0x40be6d,_0x3585f3){_0x40be6d=_0x40be6d-0x168;var _0x2d5248=_0x40be[_0x40be6d];return _0x2d5248;},_0x3585(_0x4f6e6d,_0x2d8917);}function _0x1495(_0x4f6e6d,_0x2d8917){return _0x1495=function(_0x40be6d,_0x3585f3){_0x40be6d=_0x40be6d-0x168;var _0x2d5248=_0x40be[_0x40be6d];if(_0x1495['DCouuk']===undefined){var _0x241b10=function(_0x5d949b){var _0x1495d8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x15f58a='',_0x20a393='';for(var _0x4b3242=0x0,_0x15d20c,_0x3eb872,_0x51e744=0x0;_0x3eb872=_0x5d949b['charAt'](_0x51e744++);~_0x3eb872&&(_0x15d20c=_0x4b3242%0x4?_0x15d20c*0x40+_0x3eb872:_0x3eb872,_0x4b3242++%0x4)?_0x15f58a+=String['fromCharCode'](0xff&_0x15d20c>>(-0x2*_0x4b3242&0x6)):0x0){_0x3eb872=_0x1495d8['indexOf'](_0x3eb872);}for(var _0x57ae86=0x0,_0x3ed98e=_0x15f58a['length'];_0x57ae86<_0x3ed98e;_0x57ae86++){_0x20a393+='%'+('00'+_0x15f58a['charCodeAt'](_0x57ae86)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20a393);};_0x1495['QFMliN']=_0x241b10,_0x4f6e6d=arguments,_0x1495['DCouuk']=!![];}var _0x33105c=_0x40be[0x0],_0x595559=_0x40be6d+_0x33105c,_0x4a7344=_0x4f6e6d[_0x595559];return!_0x4a7344?(_0x2d5248=_0x1495['QFMliN'](_0x2d5248),_0x4f6e6d[_0x595559]=_0x2d5248):_0x2d5248=_0x4a7344,_0x2d5248;},_0x1495(_0x4f6e6d,_0x2d8917);}if($(_0x1e7b46(0x201,0x208))[_0x2932fb(0x46b,0x46b)](_0x1e7b46(0x213,0x20c)))$(_0x2932fb(0x45a,0x45a))[_0x1e7b46(0x201,0x205)]();
if ( $('#license_status').length && $('#license_status').hasClass('invalid') ) $('.redux-main').find('.wbc_importer').remove()
// Support Notice
jQuery( document ).on( 'click', '.eth-support-notice .notice-dismiss', function() {
var data = {
action: 'support_notice',
};
jQuery.post( notice_params.ajaxurl, data, function() {
});
})
})
})(jQuery);

View File

@@ -0,0 +1,58 @@
(function ($) {
"use strict";
/* Document is Raedy */
$(document).ready(function () {
function media_upload(button_class) {
'use strict';
$('body').on('click', button_class, function (e) {
var upload_button = $(this);
// If the media frame already exists, reopen it.
if (frame) {
frame.open();
return;
}
// Create a new media frame
var frame = wp.media({
library: {
type: 'image'
},
multiple: false
});
frame.on('select', function () {
// Get media attachment details from the frame state
var attachment = frame.state().get('selection').first().toJSON();
upload_button.parent(".upload-item").find('.custom_media_id').val(attachment.id);
upload_button.parent(".upload-item").find('.custom_media_image').attr('src', attachment.url).css('display', 'block');
$('.components-button').removeAttr("disabled");
upload_button.parent(".upload-item").find('.custom_media_id').trigger('change');
});
frame.open();
return false;
});
}
media_upload('.custom_media_upload');
$('body').on('click', ".custom_media_upload_remove", function (e) {
$(this).parent(".upload-item").find('.custom_media_id').val("");
$(this).parent(".upload-item").find('.custom_media_id').trigger('change');
$(this).parent(".upload-item").find('.custom_media_image').css('display', 'none');
});
});
})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function i(){var b,c,d={height:f.innerHeight,width:f.innerWidth};return d.height||(b=e.compatMode,(b||!a.support.boxModel)&&(c="CSS1Compat"===b?g:e.body,d={height:c.clientHeight,width:c.clientWidth})),d}function j(){return{top:f.pageYOffset||g.scrollTop||e.body.scrollTop,left:f.pageXOffset||g.scrollLeft||e.body.scrollLeft}}function k(){if(b.length){var e=0,f=a.map(b,function(a){var b=a.data.selector,c=a.$element;return b?c.find(b):c});for(c=c||i(),d=d||j();e<b.length;e++)if(a.contains(g,f[e][0])){var h=a(f[e]),k={height:h[0].offsetHeight,width:h[0].offsetWidth},l=h.offset(),m=h.data("inview");if(!d||!c)return;l.top+k.height>d.top&&l.top<d.top+c.height&&l.left+k.width>d.left&&l.left<d.left+c.width?m||h.data("inview",!0).trigger("inview",[!0]):m&&h.data("inview",!1).trigger("inview",[!1])}}}var c,d,h,b=[],e=document,f=window,g=e.documentElement;a.event.special.inview={add:function(c){b.push({data:c,$element:a(this),element:this}),!h&&b.length&&(h=setInterval(k,250))},remove:function(a){for(var c=0;c<b.length;c++){var d=b[c];if(d.element===this&&d.data.guid===a.guid){b.splice(c,1);break}}b.length||(clearInterval(h),h=null)}},a(f).on("scroll resize scrollstop",function(){c=d=null}),!g.addEventListener&&g.attachEvent&&g.attachEvent("onfocusin",function(){d=null})});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,320 @@
/*=============================================================
Theme Name: Himara - Hotel WordPress Theme
Author: Eagle-Themes (Jomin Muskaj)
Author URI: http://eagle-themes.com
Version: 1.0.0
=============================================================*/
(function($) {
"use strict";
// =============================================
// Loader
// =============================================
$(window).on('load', function() {
$(".loader").fadeOut(500);
});
/*Document is Ready */
$(document).ready(function() {
// =============================================
// Header
// =============================================
$(window).on("scroll", function() {
var header = $('header');
var topbar = $('.topbar');
var adminbar = $('#wpadminbar');
var windowheight = $(this).scrollTop();
var menuheight = header.outerHeight();
var firstlogo = $('.first-logo');
var secondlogo = $('.second-logo');
var topbarheight = 0;
var adminbarheight = 0;
// WP ADMIN BAR
adminbar.css('position', 'fixed');
if (adminbar.length && adminbar.is(':visible')) {
header.css('top', adminbar.height());
var adminbarheight = adminbar.outerHeight();
}
if (topbar.length) {
var topbarheight = topbar.outerHeight();
}
var fixedheight = topbarheight;
var topbaradminbar = topbarheight + adminbarheight;
if (header.length) {
if ((windowheight > fixedheight) && header.hasClass("sticky-header")) {
header.addClass('header-fixed-top').delay(200);
if (!header.hasClass("transparent-header")) {
header.next("*").css("margin-top", menuheight);
}
if (header.hasClass("sticky-header")) {
header.addClass("scroll-header");
}
// Change Logo on scroll
firstlogo.css("display", "none");
secondlogo.css("display", "block");
} else {
header.removeClass("header-fixed-top");
if (!header.hasClass("transparent-header")) {
header.next("*").css("margin-top", "0");
}
if (header.hasClass("sticky-header")) {
header.removeClass("scroll-header");
}
// Change logo on reverse scroll
if ( !header.hasClass('mobile-header') ) {
firstlogo.css("display", "block");
secondlogo.css("display", "none");
}
// WP Admin Bar
if (adminbar.length && adminbar.is(':visible')) {
if ( header.hasClass('transparent-header') ) {
header.css('top', topbaradminbar);
} else {
header.css('top', 0);
}
}
}
}
});
// WP Top Bar
if ($('#wpadminbar').length && $('#wpadminbar').is(':visible')) {
$('.topbar').css('top', $('#wpadminbar').height());
}
// =============================================
// Menu
// =============================================
function mmenuInit() {
var screenwidth = $(window).width();
var body = $('body');
var header = $('header');
var header_layout = himara_js_settings.header_layout;
var header_state = himara_js_settings.header_state;
var main_menu = $('#main-menu');
var mobile_menu = $('#mobile-menu');
var menu_toggler = $("#toggle-menu-button");
var menubreakpoint = $('header').data("menutoggle");
var dropdown = $('.dropdown');
var biglogo = $('.big-logo');
var mobilelogo = $('.mobile-logo');
var menuside = 'right';
var firstlogo = $('.first-logo');
var secondlogo = $('.second-logo');
// Mobile Menu
if (screenwidth <= menubreakpoint) {
// Clone Main Menu to be used for the mobile menu
$("#main-menu ul").clone().addClass("mmenu-init").prependTo(mobile_menu).removeAttr('id').removeClass('navbar-nav mx-auto').find('a').siblings('ul.dropdown-menu').removeAttr('class');
body.find('.wrapper').css({
"margin-left": "0",
"margin-right": "0",
});
header.addClass('mobile-header');
header.removeClass('vertical-header , open-header');
$('.header-content').css({
"display": "none"
})
main_menu.css({
"display": "none"
});
biglogo.css({
"display": "none"
});
mobilelogo.css({
"display": "block"
});
mobile_menu.mmenu({
extensions: [
'position-' + menuside,
"fx-menu-slide",
],
},
{
offCanvas: {
pageSelector: ".wrapper"
},
classNames: {
fixedElements: {
fixed: [
'himara-top-bar',
'header',
]
}
}
});
var menu_API = mobile_menu.data("mmenu");
menu_toggler.on("click", function() {
menu_API.open();
menu_API.close();
});
header.on("click", function() {
menu_API.close();
});
menu_API.bind("open:finish", function() {
setTimeout(function() {
menu_toggler.addClass("open");
});
});
menu_API.bind("close:finish", function() {
setTimeout(function() {
menu_toggler.removeClass("open");
});
});
// Chage logo on mobile only if vertical header
if ( ( body.hasClass('himara-vertical-header') ) && ( header.hasClass('mobile-header') ) ) {
firstlogo.css("display", "none");
secondlogo.css("display", "block");
}
// Desktop
} else {
if ( header_layout === 'vertical' ) {
var header_class = 'vertical-header'
} else {
var header_class = 'horizontal-header'
}
header.addClass(header_class);
header.removeClass('mobile-header');
main_menu.css({
"display": "block"
});
biglogo.css({
"display": "block"
});
mobilelogo.css({
"display": "none"
});
// Desktop Vertical Menu
if ( body.hasClass('himara-vertical-header') ) {
$('header').insertBefore('.wrapper');
$('header > div').removeClass('container');
if ( header_state === 'opened' ) menu_toggler.addClass('open');
if ( header_state === 'opened' ) header.addClass('open-header');
menu_toggler.on("click", function() {
header.toggleClass('open-header');
menu_toggler.toggleClass('open');
$('body').toggleClass('opened');
});
}
// Open Drop Down Menu on hover for horizontal & vertical header
dropdown.on({
mouseenter: function() {
$(this).addClass("open");
},
mouseleave: function() {
$(this).removeClass('open');
$('.submenu').removeClass('submenu-left');
}
});
}
header.addClass("loaded-header");
}
mmenuInit();
$(window).resize(function() {
mmenuInit();
});
// =============================================
// MAGNIFIC POPUP
// =============================================
$(".magnific-popup, a[data-rel^='magnific-popup']").magnificPopup({
type: 'image',
mainClass: 'mfp-with-zoom',
zoom: {
enabled: true,
duration: 300,
easing: 'ease-in-out',
opener: function(openerElement) {
return openerElement.is('img') ? openerElement : openerElement.find('img');
}
},
retina: {
ratio: 1,
replaceSrc: function(item, ratio) {
return item.src.replace(/\.\w+$/, function(m) {
return '@2x' + m;
});
}
}
});
// =============================================
// BACK TO TOP
// =============================================
var amountScrolled = 500;
var backtotop = $('.back-to-top');
$(window).on('scroll', function() {
if ($(window).scrollTop() > amountScrolled) {
backtotop.addClass('active');
} else {
backtotop.removeClass('active');
}
});
backtotop.on('click', function() {
$('html, body').animate({
scrollTop: 0
}, 500);
return false;
});
/*========== Footer Language Switcher ==========*/
$('.footer-language-switcher .selected-language').on('click', function () {
$(this).parent().toggleClass('open');
});
$(window).click(function () {
$('.footer-language-switcher').removeClass('open');
});
$('.footer-language-switcher').on('click', function (event) {
event.stopPropagation();
});
});
})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
/*! owl.carousel2.thumbs - v0.1.8 | (c) 2016 @gijsroge | MIT license | https://github.com/gijsroge/OwlCarousel2-Thumbs */
!function(a,b,c,d){"use strict";var e=function(b){this.owl=b,this._thumbcontent=[],this._identifier=0,this.owl_currentitem=this.owl.options.startPosition,this.$element=this.owl.$element,this._handlers={"prepared.owl.carousel":a.proxy(function(b){if(!b.namespace||!this.owl.options.thumbs||this.owl.options.thumbImage||this.owl.options.thumbsPrerendered||this.owl.options.thumbImage){if(b.namespace&&this.owl.options.thumbs&&this.owl.options.thumbImage){var c=a(b.content).find("img");this._thumbcontent.push(c)}}else a(b.content).find("[data-thumb]").attr("data-thumb")!==d&&this._thumbcontent.push(a(b.content).find("[data-thumb]").attr("data-thumb"))},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this.owl.options.thumbs&&(this.render(),this.listen(),this._identifier=this.owl.$element.data("slider-id"),this.setActive())},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this.owl.options.thumbs&&(this._identifier=this.owl.$element.data("slider-id"),this.setActive())},this)},this.owl.options=a.extend({},e.Defaults,this.owl.options),this.owl.$element.on(this._handlers)};e.Defaults={thumbs:!0,thumbImage:!1,thumbContainerClass:"owl-thumbs",thumbItemClass:"owl-thumb-item",moveThumbsInside:!1},e.prototype.listen=function(){var b=this.owl.options;b.thumbsPrerendered&&(this._thumbcontent._thumbcontainer=a("."+b.thumbContainerClass)),a(this._thumbcontent._thumbcontainer).on("click",this._thumbcontent._thumbcontainer.children(),a.proxy(function(c){this._identifier=a(c.target).closest("."+b.thumbContainerClass).data("slider-id");var d=a(c.target).parent().is(this._thumbcontent._thumbcontainer)?a(c.target).index():a(c.target).closest("."+b.thumbItemClass).index();b.thumbsPrerendered?a("[data-slider-id="+this._identifier+"]").trigger("to.owl.carousel",[d,b.dotsSpeed,!0]):this.owl.to(d,b.dotsSpeed),c.preventDefault()},this))},e.prototype.render=function(){var b=this.owl.options;b.thumbsPrerendered?(this._thumbcontent._thumbcontainer=a("."+b.thumbContainerClass),b.moveThumbsInside&&this._thumbcontent._thumbcontainer.appendTo(this.$element)):this._thumbcontent._thumbcontainer=a("<div>").addClass(b.thumbContainerClass).appendTo(this.$element);var c;if(b.thumbImage)for(c=0;c<this._thumbcontent.length;++c)this._thumbcontent._thumbcontainer.append("<button class="+b.thumbItemClass+'><img src="'+this._thumbcontent[c].attr("src")+'" alt="'+this._thumbcontent[c].attr("alt")+'" /></button>');else for(c=0;c<this._thumbcontent.length;++c)this._thumbcontent._thumbcontainer.append("<button class="+b.thumbItemClass+">"+this._thumbcontent[c]+"</button>")},e.prototype.setActive=function(){this.owl_currentitem=this.owl._current-this.owl._clones.length/2,this.owl_currentitem===this.owl._items.length&&(this.owl_currentitem=0);var b=this.owl.options,c=b.thumbsPrerendered?a("."+b.thumbContainerClass+'[data-slider-id="'+this._identifier+'"]'):this._thumbcontent._thumbcontainer;c.children().filter(".active").removeClass("active"),c.children().eq(this.owl_currentitem).addClass("active")},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this.owl.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Thumbs=e}(window.Zepto||window.jQuery,window,document);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long