Documentation for WordPress Plugin “CBX Restaurant Booking”

Download and Installations:

Download & Install Core Plugin:

Install any Pro Addons:

  • Please check the addon section from the product page
  • After purchase any pro or free addon you will get zip package.
  • This zip package you need to install manually, wordpress code has very good tutorial about this.

Setup and Booking Form Creation

Global Setting
After install and activating the core CBX Restaurant Booking plugin there will be a menu in top level in left sidebar in wordpress dashboard. Check global setting’s tabs.
CBX Restaurant Booking Dashboard Menu

Setup and Booking Form Creation

Form Creation and Configure Form’s Setting:
Go to left dashboard menu “Booking Forms” and Create New form. In free version you can create one form. For multiple booking form you can try the CBX Restaurant Booking Pro addon. Each booking form has it’s own setting, while creating or editing any booking form there will be setting tabs where you can configure as needed.
CBX Restaurant Booking Single form setting
Shortcode and Widget
The booking forms can be shown in frontend in two ways

  1. Shortcode
  2. Widget

The shortcode for booking form is:
[cbxrbooking id="form_id_here"]
From the form listing window or form edit window you can click to copy the shortcode and paste in any page or post where you want to place it.
The booking form can be placed in sidebar using widget. Go to menu Appearance->Widgets , see there is a widget called “CBX Booking Widget”, drag it to your suitable sidebar, choose form id from the widget setting and that’s all.
CBX Restaurant Booking Widget area

Branch Manager

CBX Restaurant Booking comes with branch manager, In free version you can create one branch but using the pro addon multiple branch can be added. To created or access branch Manager check the Submenu "Branch Manager" under "CBX Booking". The branch creation is very straight forward and after creating any branch, go to any form setting and select branch to assign.

Booking Logs Manager

CBX Restaurant Booking comes with Booking Logs Manager. Any booking done by guest or admin from backend it will appear in the Booking logs. To access log manager check the Submenu “Booking Logs” under “CBX Booking”. Booking logs has advance search feature and different kind of filter to narrow down your desired booking findings.
CBX Restaurant Booking log manager

How to configure CBX Restaurant Booking Frontend Addon

Download and install CBX Restaurant Booking Frontend Addon and install(we are skipping the install part here as it’s already discussed in this article). After activating the plugin it will created a page automatically named "Booking Frontend" and install shortcode into that page automatically and there will be a new tab in global setting
CBX Restaurant Booking Frontend log global setting

Frontend Bookins and Logs Access Permission:
As soon as this addon plugin is activated the admin role user gets the special capability called "cbxrbooking_frontend". This is technical term in terms of wordpress role and capability. We recommend the plugin “User Roles and Capabilities” to edit any user role and capability. there are other plugins in the wordpress plugin directory for such purpose. Example: User Role Editor plugin. Use any such role manager plugin. Then go to users from wordpress dashboard, go edit for any user whom you want to give access for frontend logs manager and frontend booking section. See there should be ways to edit his role/capabilities if such role manager plugins are installed and then search the capability cbxrbooking_frontend, tick mark this and save, now the capability cbxrbooking_frontend given to any user will be able to view the frontend log managaer and booking on the frontend on the specific page where the shortcode for frontend booking is placed. See shortcode section below.

The default shortcode is: which works for all forms and all branch in frontend
For any specific form
[cbxrbookingfrontend form_id="form id here"]
For any specific branch
[cbxrbookingfrontend branch_id="branch id here"]
For any specific brach’s specific form id, in such case the form should have valid association with the branch in from’s admin setting
[cbxrbookingfrontend form_id="form id here" branch_id="branch id here" ]
For frontend booking for site staff, need to put extra param “showbookingform=1” which is by default enabled for default shortcode [cbxrbookingfrontend], so to disable put [cbxrbookingfrontend showbookingform=0]
[cbxrbookingfrontend showbookingform=1] or [cbxrbookingfrontend showbookingform=0]
More example
[cbxrbookingfrontend form_id="form_id_here" showbookingform=1]
[cbxrbookingfrontend branch_id="branch_id_here" showbookingform=1]
Depending on shortcode params frontend logs and booking form will appear. The way admin can view the logs from backend and edit any booking, same feature can be accessed from frontend logs plugin.
CBX Restaurant Booking Frontend logs

Sample plugin showing hooks and filter

We created a sample plugin to show how to hook , ie, adding filter and action to extend CBX Restaurant booking. In this sample plugin we covered

  • How to add new field in core plugin frontend widget
  • How to add new field in core plugin admin part
  • How to add new field in frontend log addon plugin
  • How to add new field in core plugin frontend widget

Templating System

Most frontend views supports template files. By default plugin’s template/theme files loaded from core plugin’s templates folder wp-content/plugins/cbx-restaurant-booking/templates
To override any file from theme please create a folder named cbxrbooking in your theme or child theme folder. then copy any file from core plugin’s templates folder to that folder in theme/child theme, please keep the same name and same folder structure. All addon follows same template system and from addon plugin’s templates folder you can copy any file and put in the theme/child theme’s cbxrbooking folder

Excel Import

For excel library we released a PHP Spreadsheet php library as wordpress plugin in github, please go to release page and download the latest release zip file and install via wordpress plugin manager like you install any custom plugin and activate, before install check the requirement. For more details pls check this article.

Last update: 26.05.2019
Last update by: Sabuj Kundu
Thank you.