Car Rental System 5.1 (Native WordPress Plugin)

Created: June 9th, 2015

Latest Update: April 26th, 2017

By: Native Rental

Introduction

It's a high quality, native and responsive WordPress plugin to rent a car, created by experienced Silicon Valley engineers.
100% of it's code is written by using native WordPress functions, so it much faster and secure than other similar plugins.
Also - we made it compatible with WordPress Multisite, WPML & Multi-language setup with native support for WordPress date, email & time settings.

Plus – we love mobile-first designs – that's why we used Bootstrap, Font Awesome icons, Slick Slider, CSS3 and HTML5 techniques
with smooth image resizing to 4 different sizes to make sure that your cars would look great on all mobile devices, tablets,
full-screen previews and pages with many WordPress free & Premium designs – like BeTheme or Avada Theme.

Now both – your car rental business and website can run smoothly, by accepting online reservations and managing your entire fleet,
from one control panel. By offering highly-customizable reservation system, your customers will be able to see vehicles availability,
and make online reservations with a few clicks.

Our plugin is scalable –
it's source code is fully object-oriented, clean & logical, based on MVC architectural pattern
with templates engine, compliant with
strict PSR-2 coding standard
and PSR-4 autoloaders,
and easy to understand how to add new features on your own.Our plugin has four security layers – all input data validation with data-patterns,
output escaping, ReCaptcha anti-spam protection and
API scanner to allow only legal requests. Plus it has detailed logs for individual review.Our plugin works well with big databases –
we created optimal BCNF database structure.Our plugin is ready for high-traffic websites –
we tested it on live website with 1M customers database and 500,000 active daily views.Our plugin supports server-side accelerators and template-caching –
it works well with HTTP(S) reverse proxy web application accelerators,
i.e. Varnish, and supports
WordPress template caching plugins, i.e.
W3Total Cache or
WP Super Cache.

Languages

Officially supported languages:

English

Russian

Lithuanian

Our additional translations were made by our happy customers:

Czech translation was made by Lukáš Smrček from Czech Republic,

French translation was made by Edner Zephir from Haiti,

German translation was made by Websoft AG team from Germany,

Greek translation was made by Alexandros Tsapournias from Greece,

Italian translation was made by NetHome, LTD team from Italy,

Korean translation was made by Eric Jazz from South Korea,

Romanian translation was made by Marius Stoica from Romania,

Spanish translation was made by Ana Victoria Rodríguez Guerrero from Colombia, Edner Zephir from Haiti and Anthony Ortega from Chile,

Swedish translation was made by Kristian Salov from Sweden, and

Turkish translation was made by Levent Şane from Turkey.

Please keep in mind that:

Plugin will use a language selected in WordPress global settings. If desired language is not supported by the plugin,
it will default to English.

If you want to set your WordPress website language to Italian, but keep WordPress administration language in English,
please install addition "Backend language" WordPress plugin, which is included in the package and located in
"/2. Optional Plugins/" directory ( kau-boys-backend-localization.zip ).

Plugin does support RTL (it has "Right to Left" text-ready .rtl prefix used in stylesheets).
RTL mode stylesheet is loaded, if at the begging of LANGUAGE file there is a line $lang['LTR'] = TRUE;.
Otherwise, the text and images will appear in default "Left-to-Right" way.

If translation to your language not exists, you can make it on your own by creating new language file
in Extensions/CarRental/Languages/ folder.

Key Features

100% Native WordPress code

Unlimited cars, partners, features, options & extras

Responsive / Mobile layout

Multisite, WPML & multi-language support

Price by season / day / hour / mixed

Coupons, deposits, prepayments & discounts

Multiple pick-up, return & distance fees / locations

Car / extra blocking by date & location

PayPal, Stripe, bank & manual payment integration

Google Enhanced Ecommerce & Events tracking

Multiple blog unit tracking when plugin is network-enabled

PSR-2 code on OOP MVC with PSR-4 & BCNF database

"Partner" role, allowing 3rd party companies have their own fleet & reservations

Seasonal discounts. They can be global or based on exact price plan, which can have from-to dates, or/and coupon code

Car price groups. New we can simplify our work, by entering prices to desired price group, and just assigning to needed cars, instead of entering prices individually for each car

"Get a quote" feature for car prices. If we won't select any price group for car, that will be displayed across the site, including in reservation steps

Age check support, if age is selected for at least one of selected cars and customer birthdate field is set as mandatory

Benefits manager in CRS Admin, and Benefits with their images slider shortcode for the front-end

Tax manager in CRS Admin to allow you to have more than one tax, chose if that is a global tax, or is it based on specific pick-up or return location. Tax list are displayed in front-end at last step of reservation in reservation summary

Distances and distance fees manager in CRS Admin. Also now it should distance between locations in reservation steps, i.e. “100 miles away (from pickup location)”. Distances fees are now added to overall return fee

Native support for WordPress site date & time formats & time zone settings

Ability to set any currency & currency symbol location – on the left or right to the number

After successful reservation customer & site owner will get an email notification with invoice included

Confirmation and cancellation emails, editable in admin panel

Send notification emails to admin after client cancels the reservation or PayPal reverses or refunds the reservation

Car Rental URL manager for cars, car locations and car rental pages. After saving of these settings, WordPress rewrite URLs will be flushed

Ajax-based front-end customer data loader

Native Ajax system. In CRS Admin section it is using official WordPress admin-ajax.php API, wp_nonce security verification. In front-end it is using native WordPress loading process hooks

Security protection against XSS (cross-site scripting attacks), original source validation via wp_nounce check, source certificate checking option for payment methods. Now we use native WordPress filter for ANY data that we allow to input, edit, get via Ajax, output to screen, or save to database

Code, that is nice to read, modify & extend. Based on OOP MVC architectural pattern for plugin code with Templates support. Controllers load templates via views, and use models to prepare the view in the controller. All templates (html), all assets (js, css, img), demo gallery, and all sql data (import demo, install and reset) are now only in extension folder. And only template defines which assets it needs to load (not register, as assets registration happens in front/admin loaders), except for global css styles (not shortcodes css), which is used out the plugin shortcodes scope

Informative messages and debug. All okay/error/debug messages engine. Each model has it’s own okay/error messages stack, and debug setting ON/OFF. Plus only controllers are taking care of printing stacked okay/error/debug messages from models, and they depend on WordPress WP_DEBUG and WP_DEBUG_DISPLAY settings only

For individual location page, or if pick-up or return location id is provided, the time selector hours list are based on that exact location business hours+afterhours (if location is working in afterhours)

You can define maximum units per reservation & total units in stock for each car & extra

Block all or desired amount of car units for chosen date & time ranges by location

Block all or desired amount of extra units for chosen date & time ranges

Set car block interval between two reservations

Pick-up & return from multiple locations

Ability to set closed dates for all or specific locations, when reservation is not available

Ability to set set different business hours for each day of week for every location

An easy way to create more plugin styles

Installation

Step 1 - Open your WordPress admin dashboard - it is located at http://www.yoursite.com/wp-admin/ .

Step 2 - Click on [Add New] button under the "Plugins" menu on the left side navigation.

Step 8 - In WordPress front-end page, where you added search shortcode, you will see reservation engine.

Step 9 - Congratulations, you're done! We wish you to have a pleasant work with our Native Car Rental System for WordPress.

Updating the plugin from v4.3

Important notice! If you have version, older than CRS v4.3, you need first install CRS v4.3. You can ask for it via support email.

To update from CRS V4.3 to CRS V5.1 follow these steps:

Step 1 - Make sure you have a latest DB backup with you before updating the plugin.

Step 2 - Make sure that your "/wp-content/uploads/" directory is writable.
If server is using not apache user to write to folder, CHMOD 0755 is not enough - you need to set permissions (CHMOD) to 0777.
Note: if you have a multisite setup, you need to do the same CHMOD to 0777 to "/wp-content/uploads/sites/2/", "/wp-content/uploads/sites/3/" etc. folders.

Step 3 - Please remove old plugin's folder via FTP by using FileZilla or similar FTP client.
Plugin will get disabled automatically by the WordPress, do not click disable on your own.

Step 7 - That's it! You're now ready to use the version 5.1 of Native Car Rental System for WordPress.

Please keep in mind that:

Please note, that if you see that after update "/wp-content/uploads/car-rental-gallery/" directory
is not renamed to "/wp-content/uploads/CarRentalGallery/"
(or "/wp-content/uploads/sites/2/car-rental-gallery/" to "/wp-content/uploads/sites/2/CarRentalGallery/" etc. for multisite setup),
you will have to create that directory manually via FTP client like FileZilla and set it's permission to 0777.

Shortcodes

Global Search

Description:
Global search displays the search form, and all later reservation steps
- car list, reservation options, reservation summary, reservation confirmation.
The search form returns search results in the in same page or different page,
if 'action_page' attribute is used with other page id.
Also any search form field can be enabled, disabled, or marked as required from Global Car Rental Settings in CRS Admin.

Keep in mind that:
If you have a high traffic load website,
and you are using server-side HTTP(S) reverse proxy web application accelerator
(i.e. Varnish 5.1) and/or
WordPress template caching plugin (i.e.
W3Total Cache or
WP Super Cache),
then use of 'action_page' search parameter is mandatory,
and you must return search results in separate page that is excluded from caching.

Description:
Cars price table displays deposit and prices of each car that is enabled,
and is selected to be displayed in price table (or, if pickup_location_id parameter is provided
- enabled, available for pick-up from that location, and selected to be displayed in price table).
Prices are grouped here by price plan's discount period from-to, that are used by all price plans (global discounts),
or by specific price plans, that ARE NOT (!) using coupon codes.
When plugin engine counts the car price per period, it takes all seasonal and regular price plans of price group
for upcoming 7 days (today + 6 more days), that DOES NOT (!) have coupon code set.
Period here is a minimum time frame that can change the car price. It is set in CRS Settings as price model:
- price per day, if price model is set to "daily" or "mixed";
- price per hour, if price model is set to "hourly".
Price will be displayed only if car has price group assigned. If price group is not set for that car,
then it will display "Get a quote" text instead of price.

Example shortcode:

[car_rental_system display="prices" layout="table"]

Cars availability calendar

Description:
Cars availability calendar displays availability of each car for next 30 days (today + 29 days more) that is enabled,
and is selected to be displayed in availability calendar (or, if pickup_location_id parameter is provided -
is enabled, set as available for pick-up from that location, and is selected to be displayed in availability calendar).
For each date of these upcoming 30 days, plugin engine check how many car units are available for all 24 hours.
It displays two numbers for each date - full-day availability (big number) and partial-day availability (small number in grey).
For big number car unit is counted as available if it is not reserved by other customer and are not blocked by site admin for 24 hours of that date.
For small number car unit is counted as available if it is not reserved by other customer and are not blocked by site admin from noon till midnight.
The start time (noon) for small number can be changed in "WordPress Admin -> CRS Admin -> Settings -> Noon time". By default noon time is 12:00 PM.

If you will use a JS redirect drop-down, Google bot may not be able
to index that kind of content, unless you make a separate section in "sitemap.xml" (if you use it)
with the list of all possible URL combinations for these body types.

"car_rental_partner" parameter will work ONLY (!) if "Reveal Partners" setting
is set to "Yes" in Car Rental -> Settings -> Tab: Global Settings.

URL parameters can be send via $_POST, $_GET or $_COOKIE.

Shortcode attributes has higher priority over URL parameters, so URL parameter will only work if that specific
shortcode attribute is not used for that shortcode, or that specific shortcode attribute
is set to '-1' (all).

Blocks - view blocked cars and add new blocks. For blocks the minimum period until pick-up, minimum and maximum reservation durations,
past date and maximum units per reservation validations are voided, differently to front-end reservations,
to allow CRS Managers and CRS Partners to have full flexibility to set their cars availability.

Car Prices

First - login to your WordPress admin dashboard. You will find the following options in "Car Rental -> Car Prices" menu item.

Duration Discounts - add/edit discount percentages based on reservation duration for all price plans or for specific price plan.

Discounts in Advance - add/edit discount percentages based on reservation in advance for all price plans or for specific price plan.

Extras Manager

First - login to your WordPress admin dashboard. You will find the following options in "Car Rental -> Extras Manager" menu item.

Overview - all extra prices and discounts summary in one place.

Extras - add/edit extras, set their deposits and prices per hour / per day / per reservation, i.e. GPS or Baby Seat.

Options - add/edit options for each extra in drop-down or slider.

Duration Discounts - add/edit discount percentages based on reservation duration for all extras or for specific extra.

Discounts in Advance - add/edit discount percentages based on reservation in advance for all extras or for specific extra.

Blocks - view blocked extras and add new blocks. For blocks the minimum period until pick-up, minimum and maximum reservation durations,
past date and maximum units per reservation validations are voided, differently to front-end reservations,
to allow CRS Managers and CRS Partners to have full flexibility to set their extras availability.

Location Manager

First - login to your WordPress admin dashboard. You will find the following options in "Car Rental -> Location Manager" menu item.

Distances - add/edit distances and distance fees between different locations.

Closed days - set/unset dates, when all locations or specific location will be closed.

Customer Manager

First - login to your WordPress admin dashboard. You will find the following options in "Car Rental -> Customer Manager" menu item.

Customers - add/edit all your customers. Also you can view paid / unpaid reservation list for each customer.

Reviews - add/edit customer reviews and ratings.

API Log - review customer lookup log.

Reservation Manager

First - login to your WordPress admin dashboard. You will find the following options in "Car Rental -> Reservation Manager" menu item.

Pick-ups - today's and upcoming pick-ups. Also here you can search for pick-ups in specific date range.
For each pick-up you can view details, print invoice, mark it as paid, mark it as returned early, refund, cancel or delete.

Returns - today's and upcoming returns. Also here you can search for pick-ups in specific date range.
Also in these tabs you can search for any period of pick-ups/returns/reservations.
For each return you can view details, print invoice, mark it as paid, mark it as returned early, refund, cancel or delete.

Reservations - today's and upcoming reservations. Also here you can search for reservations in specific date range.
For each reservation you can view details, print invoice, mark it as paid, mark it as returned early, refund, cancel or delete.

Cars Calendar - see car units availability for upcoming 30 days in calendar view, or make a search for any period.

Extras Calendar - see extra units availability for upcoming 30 days in calendar view, or make a search for any period.

Payments & Taxes

First - login to your WordPress admin dashboard. You will find the following options in "Car Rental -> Payments & Taxes" menu item.

Prepayment - select prepayment amount based on reservation duration. Also here you can select what will be included
in the prepayment - car prices, car deposits, extra prices, extra deposits, pick-Up fees, distance fees, returns fees.

If you uncheck all payment methods, the system will still work, just do not show payment options at all.

If you will select only 1 payment method available, system won't allow the customer to mark payment method radio
box on step 4 (reservation summary), but will just show the information about which payment method will be used
and it's description bellow.

In reservation process, the payment description are shown bellow the payment method name.

Settings

First - login to your WordPress admin dashboard. You will find the following options in "Car Rental -> Settings" menu item.

System Status - Here you can see your current car rental system version. Also you will be redirected to this page, when the system will have an available update. In that case on this page there will be an update instructions and [Update] button.

Import Demo - Here you can import supported system demos.:
Please note that by importing a demo you will flush all your current car rental system data. Other WordPress pages & settings will not be impacted.

Note for mixed price model:

If you want to use mixed price calculation type, then you must enter both - daily and hourly - prices in for each price plan in "Car Prices" menu item.

Then the final car & extra prices for that period of time will be calculated in this way:

If Price calculation mode is set to daily, then price will be calculated for 3 days by using car's & extra's daily price field data.

If Price calculation mode is set to hourly, then price will be calculated for 54 hours by using car's & extra's hourly price field data.

If Price calculation mode is set to combined - daily & hourly, then price will be calculated for 2 day(s) and 6 hour(s) by using car's & extra's daily price field data for 2 days + 6 hours by using car's & extra's hourly price field data.

Frequently Asked Questions

What to do if e-mail sending is not working?

Probably your server is not configured for SMTP email sending. This means that your need to use
your own separate SMTP mail server or 3rd party SMTP mail server (i.e. Zoho.com, GMail.com). Also, in this scenario, to send emails,
you will need to install additional "Easy WP SMTP" WordPress plugin, which is included in the package and located in
"/2. Optional Plugins/" directory ( easy-wp-smtp.zip )

What to do if I can't upload / see car images?

Make sure that your "/wp-content/uploads/" directory is writable.

If server is using not apache user to write to folder, CHMOD 0755 is not enough - you need to set permissions (CHMOD) to 0777.

If you have a multisite setup, you need to do the same CHMOD to 0777 to "/wp-content/uploads/sites/2/",
"/wp-content/uploads/sites/3/" etc. folders.

Please note, that if you see that after update or after uploading the first car image the "/wp-content/uploads/CarRentalGallery/"
directory is not created (or "/wp-content/uploads/sites/2/CarRentalGallery/" etc. for multisite setup),
you will have to create that directory manually via FTP client like FileZilla and set it's permission to 0777.

My server does not support $_SESSION, how can I still use the plugin?

In case if your server does not support PHP sessions, there is a 3rd party plugin - "WordPress Native PHP Sessions",
which included in the package and located in "/2. Optional Plugins/" directory ( wp-native-php-sessions.zip ).
This plugin implements PHP's native session handlers, backed by the WordPress database. This allows plugins,
themes, and custom code to safely use PHP $_SESSIONs in a distributed environment where PHP's default tempfile storage
just won't work.

Where can I get a great free design which works well with this plugin?

WordPress default "Twenty Sixteen" theme is already in the WordPress default package. That theme is fully compatible
with newest coding, W3C, HTML5, CSS3 and WordPress standards.
We recommend using "Full width" page template, but it can be any other great WordPress free theme, or any page template.

Where can I get a great premium design which works well with this plugin?

We recommend "BeCarRental" design from "BeTheme"
250+ themes pack, which incorporates bunch of hi-end features (visual content editor, Google Fonts, Twitter Bootstrap etc.).
"BeTheme" uses their own icon set, so to have support for FontAwesome icons, you will also need to be sure that you enabled
"Font Awesome" in Car Rental System Settings.
We recommend using "Full width" page template, but it can be any other great WordPress Premium theme, or any page template.
Also, make sure that you have set the "Steel Blue" style in Car Rental System Settings.

What to choose for multiple languages - WordPress Multisite or WPML?

Short answer - if you can choose, choose WordPress multisite.
Long answer - if you‘re thinking that your business will scale or will face a heavy traffic in the future and you want to run it in multiple language, we highly recommend you to go with official WordPress multisite setup and "network-enable" the plugin and do not use WPML.

How to copy all plugin data from demo website to my website?

For people, who would like to replicate demo content, we made a copy of our English Car Rental Agency website.
To import a demo you need to go to WordPress admin, click on "Car Rental" section in left navigation menu
and choose "Settings" element.
Then go to tab "Import Demo", select "Car Rental Agency" demo item from drop-down in that tab,
and click "[Import]" button.

Please keep in mind that:

By importing demo you will flush all your existing car rental data.

Other website content, including pages content, won't be affected, so you still have to add the shortcodes by yourself.

Make sure you have a latest DB backup with you before performing this action.

Q: How can I set discounts that my daily rate would be $50, weekly rate would be $330,
and for each extra day it would cost additional $50?

You need to add discount periods for that:
0-6 days: 0%
7-7 days - A % (so that it would be 330/7= $47.14/day)
8-8 days - B % (so that it would be 330/8= $47.50/day)
9-9 days - B % (so that it would be 430/9= $47.78/day)
And so on.

Q: How can I make search in new page?

Please create a new WordPress page, put a [car_rental_system display="search" steps="form,list,list,table,table"] shortcode
to it and get that page id. Then use that page id for 'action_page' attribute value for your main page search form,
where you have you have your primary search shortcode.

Q: How to change visual style (HTML and CSS) of search form?

The easiest to do without template overriding, is just
to edit HTML of '/Extensions/CarRental/Templates/Front/Booking/template.Step1SearchForm.php' and
CSS at '/Extensions/CarRental/Assets/Front/CSS/style.CrimsonRed.css'.
The exact location of each CSS class line in CSS file can be seen with Firefox Developer Edition browser and
it's 'Developer Tools' with 'Inspector' tool.
If this seem hard to do for yourself, please contact our partners for custom work (see 'Support' section in this documentation).

Q: How can I create another cars front-end listing template?

You need to a new shortcode attribute handler with it's controller and template file:
1. Create a template file, i.e. 'template.ModernList.php' in the '/Extension/CarRental/Templates/Front/' folder
(at first it can be just a copy of 'template.ItemsList.php')
2. Create a 'ModernController' controller class file, i.e. 'class.Modern.php' in '/Controllers/Front/Shortcodes/' folder
(at first it can be just a copy of 'class.Items.php' with a class rename to 'ModernController').
3. Add a new resource handler in shortcode parser - you need to add a new CASE for switch statement
for parseShortcode($attributes) method in \Controllers\Front\LoadController final class, i.e.:

4. Use the newly added shortcode in a WordPress page, where you want to display a new listing content:

[car_rental_system display="modern" layout="list"]

Q: How to make changes the the templates that uses for car ("car_rental_item"),
page ('car_rental_page') and location ('car_rental_location') WordPress post types?

You can create 'single-car_rental_page.php', 'single-car_rental_item.php', 'single-car_rental_location.php' files
in in your theme folder. WordPress core should pickup these template files.
At the begging these templates can be a copy of single page template or default theme page template.

Q: I need the script for motorbikes and bicycles, how to change the language text for that?

You need to modify the text in '/Extension/CarRental/Languages/en_US.php' language file,
and replace all words in file from 'car' to 'bike' and from 'Car' to 'Bike'.

Q: Plugin does not have a translation to my language. How can I translate it?

If your language, if it is not yet listed in existing translations, then you need to make a copy
of 'Extensions/CarRental/Languages/en_US.php' language file as '[YOUR-LANG-CODE].php'
(for exact language code of your language, please download see 'Language Kit for Translators' folder in the package),
and translate the text next to language keywords.
Also, if you want to be sure that your language file will be always up-to-date with the newest plugin versions,
please add it to ZIP file and send it to us via contact email.

Support

If you need any help regarding this plugin installation & usage, please write to our support with topic
"CodeCanyon Support" and your purchase code.

You also car write to our partners about customer features development for your individual needs. To do that write
to our support with topic "CodeCanyon Custom Feature Inquiry" and your purchase code.
Or you can contact them directly.