For OpenCart 2.3, 3.0, 4.0 and 4.1
How it works
- In the module page you tick "Rental" on a product and set how many units you can rent at the same time and the shortest and longest stay in days. The product price is the price per day.
- The product page then shows a date picker (start and return date) with the price per day. As soon as both dates are chosen it checks them and shows the number of days and the total, or tells the customer why the dates are not possible.
- The dates travel through the normal cart, checkout and order as a required "Rental period" option (it shows on the order, the invoice and the order e-mail). The cart quantity is the number of days, so the cart total, tax, shipping and your payment methods all work as for any product. Typing another quantity in the cart does not change the days.
- The return day is not charged and does not block the next customer: a rental from the 10th to the 13th is 3 days and the 13th is free again.
Availability
- Each day counts the bookings against your units. A period is refused if any of its days is full, with the first full day named.
- You can set the earliest start (for example from tomorrow) and the latest start (how far ahead customers can book).
- A calendar in the module page shows booked units against units for each day of a month (full days in red).
- Block dates or add a booking by hand (maintenance, private use, phone orders): it counts against the units like an order, and can be cancelled.
Bookings from orders
- When an order reaches a status in which the shop holds stock back (your processing and complete statuses) its rental lines become bookings. When it is cancelled or moves to a status that does not hold stock, the dates are freed; if it earns again they come back, with no duplicates.
- If two customers order the same last unit at the same moment, the second booking is recorded as a "Conflict" so you can sort it out by hand.
- A bookings list with a status filter (booked, conflict, cancelled) and a cancel button.
For the store owner
- One admin page: settings, rental products (search, units, shortest and longest stay), calendar, block dates, bookings.
- Switching a product to rental adds the required "Rental period" field and sets the product not to subtract stock; switching it off removes the field again. Uninstalling removes the field from all products so the shop sells them normally; your rental setup and bookings are kept and the field comes back when you reinstall.
- Every storefront text is in one language file you can copy and translate. No core files are edited. Checked with the default theme and the Aurora theme.
Notes
- Rentals are by whole days at one price per day. There is no hourly booking, no weekend or seasonal prices and no deposit.
- Dates are not held while they sit in a cart: availability is checked when the item is added and again when the order is booked.
- The dates are shown in the cart as YY-MM-DD, for example 26-11-13 to 26-11-17, because the shop cuts longer option text in the cart.