Giter Site home page Giter Site logo

wp-hotelier / wp-hotelier Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 11.0 2.89 MB

Manage your hotel bookings with WordPress. https://wphotelier.com/

License: Other

CSS 9.15% JavaScript 3.39% PHP 80.11% SCSS 7.35%
wordpress booking booking-system php wp-hotelier hotel hotel-booking hotel-reservation

wp-hotelier's Introduction

WP Hotelier

npm XO code style

Welcome to the WP Hotelier GitHub repository. The documentation for the WP Hotelier plugin can be found on WPHotelier.com, here you can browse the source of the project, find and discuss open issues.

Installation

For detailed setup instructions, visit the official WP Hotelier Documentation website.

  1. Clone the GitHub repository: https://github.com/wp-hotelier/wp-hotelier.git
  2. Or download it directly as a ZIP file: https://github.com/wp-hotelier/wp-hotelier/archive/master.zip

Like any other WordPress plugin, place it in /wp-content/plugins/ (the extracted wp-hotelier folder).

NPM usage

This repository comes with a ready to use package.json file that allows you to run and watch some powerful tasks. You can compile your Sass files, minimize your scripts, preview your changes and so on.

The first thing you need to do is install the npm dependencies. So, with the terminal cd into the wp-hotelier folder and run npm install.

To make your life easier, the project uses a .npmrc file (not included in this repo) to pass the project configuration values. So, create a .npmrc file in the root of the wp-hotelier folder and adjust the following settings:

WPHOTELIER_URL='http://path-to-your-wordpress-installation'
WPHOTELIER_SSHPORT='22'
WPHOTELIER_SYNCDEST='username@hostname:path'

Settings in detail:

  • WPHOTELIER_URL: proxy URL to view your site; more info here
  • WPHOTELIER_SSHPORT: SSH port
  • WPHOTELIER_SYNCDEST: rsync destination; for example username@hostname:/var/www/html/wordpress/wp-content/plugins/wp-hotelier

Tasks included

There are five tasks you can run during the development of WP Hotelier. And four of them (build, build-sync, build-server and build-sync-server) watch for changes.

build

This task compiles Sass files, optimizes the CSS, lints and minimizes the Javascript files and generates the pot file of WP Hotelier. Just run this command in the terminal:

npm run build

build-sync

Same as the build task plus the possibility to sync the wp-hotelier folder with another folder in a different server or VM. Useful to sync a local wp-hotelier folder with the folder in wp-content/plugins/wp-hotelier (in another server or VM). You need to specify a correct destination and SSH port in the .npmrc file: WPHOTELIER_SYNCDEST and WPHOTELIER_SSHPORT.

Run this command in the terminal:

npm run build-sync

build-server

Same as the build task plus the possibility to sync your WP installation across multiple devices with Browsersync. You need to specify a correct proxy URL in the .npmrc file: WPHOTELIER_URL.

Run this command in the terminal:

npm run build-server

build-sync-server

All the previous three tasks together.

Run this command in the terminal:

npm run build-sync-server

dist

Run this command to create a zip file containing the production files:

npm run dist

Scope of this repository

This repository is not suitable for support. But for issues related to WP Hotelier (core plugin only). Please don't submit support requests, use the official support channels for that:

Support requests or issues related to extensions or themes will be closed immediately.

wp-hotelier's People

Contributors

benitolopez avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wp-hotelier's Issues

Add Payment Gateways

How do I go about adding payment Gateways to the website so they can be downloaded by users?

I have developed two, Lips Na Mpesa (for Kenya) and Flutterwave(Africa) and would like to make these available for download/purchase.

How do I go about this? I couldn't find anything on the website.

Add a custom field "Kitchen"

Hi,

Fantastic plugin - kudos ๐ŸŽ‰

Do you know how I can add a custom field like we have for "Guests" and "Children". I'd like to add a checkbox "Kitchen" that can be used to filter rooms by whether they have kitchen enabled or not.

I read through docs but I'm struggling a bit with understanding on what needs to be added in functions.php

The docs here https://docs.wphotelier.com/article/70-add-new-booking-fields seems to be related to booking fields at the checkout process.

Thanks!

Calendar datepicker not working when a reservation item is underneath

In the calendar page, the datepicker setting the marker query parameter doesn't work properly when there's a reservation item underneath it.
image

In the image above, whichever date you click on on the datepicker, it will effectively click (and open) the reservation item immediately underneath the clicked date instead of selecting the date itself.

The problem resides in the z-index css property:

  • The datepicker element has z-index: 1;
  • bc__reservation-link class has z-index: 4.

Thus, the reservation item is visually below the datepicker, but the anchor element stands over it.

Not sure why bc__reservation-link needs to have z-index: 4, but if that cannot be reduced, the workaround would be increasing the datepicker's z-index overriding its value with the following css directive:

#ui-datepicker-div {
  z-index: 5 !important;
}

Suggestion

You can add a dashboard page to visualise all the system

Won't add reservation even if room is available

Issue
Adding a multi-day reservation fails with error "Sorry, this room is not available on the given dates" even when the room is actually available.

Example
Using the example from the image below, if I add a new reservation (both from the admin area and the frontend) from Nov 18 to Nov 21, this will fail. Note that there are 4 Twin rooms in stock.
Example from calendar

What's up?
What the plugin does (includes/class-htl-room.php@get_reserved_rooms) is counting the total number of the reservations for the given room type in the whole period (Nov 18 to Nov 21, in the example above) and compare it to the number of rooms in stock.

Using the same example, the total reservations for that room type in that period is 5, which is greater that the stock (4) and therefore the new reservation is rejected.

What should happen
The plugin should, instead, check day by day if there are enough available rooms.
Going back to the example: for Nov 18 has 2 reservations, Nov 19 has 2, Nov 20 has 3 and Nov 21 has 1. All of them are less then the stock (4), hence the reservation shall be accepted.

A non-numeric value encountered error

Hi, got this error in reservation edit-page:

Warning: A non-numeric value encountered in /Users/valentin/Documents/projects/hotel/wp-content/plugins/wp-hotelier/includes/class-htl-reservation.php on line 888

Booking widget dateformat

Can you make dates in widgets be dependent on wordpress date format?
<span class="widget-booking__month-year"><?php echo date_i18n( 'M Y', strtotime( $checkin ) ); ?></span>

Suggestion:
<span class="widget-booking__month-year"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $checkin ) ); ?></span>

Stats tool

Would be useful to have a tool to visualize and export reservation stats.

The tool shall allow the admin users to select a date range to elaborate the stats.

The stats for the selected time period shall be visualised in form of tables and/or graphs and available to be exported in .csv format.

The stats shall be able to broken down by day/month/year.

Stats indicators:

  • Number of rooms/beds occupied, with room type break down;
  • Total income for the occupied rooms/beds;
  • Guests nationality (would involve to change the Country text field in the reservation forms to a dropdown select box).

Available to further flash out the requirements and develop the feature! ๐Ÿ˜ƒ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.