PS PrestaShop Intermediate

Product Rental — Complete Guide

Install, configure and operate product rental: availability calendar, deposit, degressive or percentage pricing, booking requests without payment, packs and REST API, with booking tracking for PrestaShop 8 and 9.

Updated Module version 1.5.7

Overview

The Product Rental module (dfproductrental) adds a rental mode you enable product by product on your PrestaShop store. On a rentable product page, the customer picks a date range in a calendar that automatically greys out already booked days, and the price is computed per day using degressive tier pricing, as fixed amounts or as a percentage of the sale price. The module manages a deposit per product, enforces duration with a minimum and a maximum number of days, accepts booking requests without payment, synchronises the availability of packs and their components, exposes a REST API for your management software, and tracks every booking from a dedicated back-office, from cart to the item’s return.

Ideal for equipment, furniture, event gear, instruments, vehicles or tools: any item that is rented rather than sold once and for all. Rental mode is enabled only on the products you designate, without distorting the rest of your catalogue.

Compatibility

  • PrestaShop 8.0 to 9.x
  • PHP 7.4 to 8.3
  • Single store and multistore
  • 5 languages: FR, EN, ES, DE, IT
  • Classic theme and custom themes
  • No dependency: no Composer, manual PSR-4 autoloader, flatpickr calendar bundled locally (FR locale included)

Installation

  1. In the back-office, open Modules > Module Manager.
  2. Click Upload a module then select the dfproductrental.zip file.
  3. Once installed, click Configure.

On installation, the module creates its three tables (df_rental_product, df_rental_tier, df_rental_booking), registers its hooks, initialises its default settings and adds two entries under the Catalog menu: Rental – Products and Rental – Bookings. Upgrading from version 1.2.0 or 1.3.0 is covered by fault-tolerant upgrade scripts: simply install the new ZIP on top.

General settings

The module configuration page gathers the global options applied by default to all rentable products.

  • Buffer delay (days): number of days blocked after each return, to prepare, clean or check the item before the next rental. Global value, overridable per product.
  • Booking horizon (days): limits how far into the future a customer can book (365 days by default).
  • Pending cart expiry (minutes): delay after which an unconfirmed booking releases its dates (60 minutes by default).
  • Integrate the deposit into the cart line: when active, the deposit is added to the line price and returned via credit slip on return.
  • Hide the native “Add to cart” button: on rental products, hides the classic buy button in favour of the booking button.
  • Default deposit: amount suggested by default when creating a new rentable product.
  • Pack synchronisation: enables or disables the automatic propagation of pack bookings to their rentable components (enabled by default).
  • Request expiry (hours): beyond this delay, a booking request left unanswered is cancelled and its dates are released (0 = never, the default).
  • API: activation switch, read-write token and read-only token, each regenerable in one click. The endpoint documentation is displayed right below this panel.

Configuring a rentable product

Go to Catalog > Rental – Products, then Add.

  • Product: select the catalogue product to make rentable.
  • Active: enables or suspends rental on this product.
  • Pricing mode: fixed amounts, or percentage of the product’s sale price (see below).
  • Base daily price: daily rate applied when no tier matches the chosen duration.
  • Deposit: amount of the deposit required for this product.
  • Minimum / maximum duration (days): bounds the date range the customer can select.
  • Available units: number of copies you own. A date is blocked only when all units are rented at the same time.
  • Buffer delay: keep the global value or set a buffer specific to this product.
  • Allow request without payment: displays a booking request button on the product page, alongside or instead of the classic checkout flow.
  • Requests block stock: determines whether this product’s pending requests reserve the dates until you decide.

Degressive pricing tiers

Below the form, add as many tiers as needed. Each tier is defined by a minimum day, a maximum day and a daily price.

The module applies the tier whose range contains the chosen duration. A tier whose maximum day is 0 is treated as unlimited. If no tier matches, the base daily price applies.

Example: 39 €/day from 1 to 3 days, 32 €/day from 4 to 7 days, 26 €/day from 8 days onward (maximum day set to 0).

Percentage mode

In percentage mode, the base daily price, the deposit and the tiers are no longer currency amounts but percentages of the product’s tax-excluded sale price. A product sold at €1000 with a deposit set to 10 thus requires a €100 deposit; a daily rate of 2 gives €20 per day. Amounts automatically follow your catalogue prices: it is the fastest way to apply a uniform pricing grid to a large number of rentable products.

Storefront usage

The availability calendar

On the product page, a date range picker is displayed. Already booked days are automatically greyed out and not selectable, as are buffer days after each return. The customer picks a start date and an end date within the duration limits you set.

Price calculation

As soon as a valid range is selected, a summary details the number of days, the applied daily price (per tier), the rental total, the deposit and the grand total. The customer knows exactly what they pay before adding to cart.

The booking

The Book these dates button adds the rental to the cart. The rental price is injected via a cart-scoped specific price: the product’s original price stays intact in the catalogue and for all other sales. A booking is created in a pending state and blocks the chosen dates.

If the order is not validated within the configured expiry delay, the cart expires and the dates are automatically released for other customers. At order validation, the booking switches to confirmed and links to the customer and the order.

Booking request without payment

On products where the Allow request without payment option is active, the product page displays a Request a booking button. The customer picks their dates and quantity as for a regular booking, then fills in their contact details: logged-in customers are identified automatically, visitors enter their name, email and, optionally, their phone. A free message field accompanies the request.

The request appears in Catalog > Rental – Bookings with the Pending request status. Two actions are available on each row:

  • Accept: the module re-checks the availability of the period (concurrent requests included) then switches the booking to confirmed. The customer receives an acceptance email.
  • Decline: the booking switches to declined, its dates are released and the customer receives a decline email.

Three automatic emails accompany the flow: an acknowledgement to the customer when the request is sent, a notification to the merchant with the customer’s contact details and message, then the decision email. The templates exist in the module’s five languages and can be customised like any PrestaShop email.

Stock blocking by requests is finely tuned: a per-product default (Requests block stock) and an individual switch on each request in the bookings list. A request that does not block stock leaves the dates bookable by other customers until it is accepted. A configurable expiry delay (in hours) can automatically cancel unanswered requests and release their dates.

Product packs

The module supports native PrestaShop packs. When a pack contains components that are themselves configured as rentable, booking the pack automatically creates linked bookings on each of its components, taking pack quantities into account. In practice:

  • Booking a pack blocks the availability of each of its rentable components over the same period.
  • Booking a component alone makes the pack unavailable on those dates as soon as not enough units remain.
  • Any change to the pack booking (dates, quantity, status, cancellation) is automatically propagated to its component bookings.

Component bookings are hidden on the customer side (the customer only sees their pack) but visible in the back-office with a Pack #N badge pointing to the parent booking. They cannot be edited directly: the pack booking is the source of truth. A global setting lets you disable the whole mechanism if you prefer to manage packs as independent products.

REST API

The API exposes rental as JSON for your fleet, planning or invoicing software. Enable it in the module configuration: two tokens are generated, regenerable in one click: a read-write token and a read-only token, accepted on GET endpoints only. Every request must present one of these tokens via the X-Api-Key or Authorization: Bearer header.

Endpoints

  • GET ping: authentication and version check.
  • GET products: list of rentable products with their configuration (price, deposit, tiers, units, pricing mode).
  • GET availability: day-by-day availability of a product between two dates, remaining units included.
  • GET bookings: list of bookings, filterable by status, id_product, from, to, updated_since and external_reference, paginated with limit and offset.
  • POST bookings: creation of a booking in requested or confirmed status, with availability check (bypassable with force). The external_reference field (64 chars max) makes creation idempotent: if a booking already carries this reference, it is updated instead of duplicated.
  • POST bookings&id=N: modification of a booking (dates, quantity, status), propagated to pack components.
  • DELETE bookings&id=N: cancellation of a booking.

The updated_since filter enables incremental sync: your software remembers the date of its last pass and only fetches the bookings changed since. The API does not push outgoing webhooks: synchronisation is done by periodic polling. The exact URLs and request examples are displayed in the module configuration page.

Booking tracking

In Catalog > Rental – Bookings, you find all bookings with their product, customer, order, dates and status, identified by a colour-coded badge.

  • Pending request: request without payment awaiting your decision.
  • Pending: added to cart, awaiting order validation.
  • Confirmed: order validated or request accepted, dates reserved.
  • Active: rental period in progress.
  • Returned: item returned.
  • Declined: request declined, dates released.
  • Cancelled: booking cancelled, dates released.

The detail of each rental also appears in the cart, on the order confirmation page and in the back-office order page. On the customer side, the My rentals page in the My account area lists all their rentals with their period, duration, deposit and status.

The deposit is refunded via credit slip when the item is returned, from the PrestaShop order page. This is the simplest and most transparent method for the accounting of most rental shops.

Version 1.5 options

Version 1.5 expands date selection, pricing and deposit management. All the options are set in the module configuration.

Date selection

Two display modes: a single period field with a two-month calendar, or two separate start and end fields. Pick-up and return times can be enabled; they are recorded on the booking and exposed in the API. The position of the rental block on the product page is configurable among seven hooks, with a fallback hook for themes without displayProductAdditionalInfo.

Cart-wide rental dates

Enabled by default, they apply a single period to every line of the order. Product pages come pre-filled with the cart’s period, and the cart offers an editor to change the dates of the whole order, with availability re-checks and price recalculation on every line. An option moves date selection entirely into the cart: the product page only asks for the quantity, and the first available period is proposed automatically on the first add.

Whole catalog for rent

For rental-only shops: every active product becomes rentable without individual configuration. The base amount is taken from the sale price, the rental stock follows the PrestaShop stock, and booking requests can be allowed globally.

Duration coefficients

In coefficient mode, the price is computed as base amount multiplied by a coefficient. The day-range grid is configurable (by default 1 day: 1, 2 days: 1.5, 3 days: 2, 4 to 7 days: 3, 8 to 14 days: 5, 15 to 21 days: 7, 22 to 30 days: 9). Two priority weekend exceptions are adjustable: Saturday to Monday (coefficient 1 by default) and Friday to Monday (1.5 by default). Beyond the maximum duration (30 days by default), the price switches to on request: adding to cart is blocked and the booking request without payment takes over.

Deposit

Three modes: per product (historical behaviour), automatic global or disabled. In global mode, a single deposit is computed for the whole order: base amount incl. tax multiplied by a multiplier (2 by default), with a minimum (500 by default) and rounding up to the next step (100 by default). It is recorded on the order’s first booking and remains editable in the back-office. Charging is independent: deposit charged at payment, or simply displayed for a bank imprint. Deposit columns disappear from the summaries and the PDF invoice when no line carries one.

FAQ and troubleshooting

Does the rental price change my product’s price?

No. The price is injected via a specific price linked only to the current cart. The product’s original price stays unchanged in the catalogue and for other customers.

How does degressive pricing work?

You define tiers (minimum day, maximum day, daily price). The module picks the tier whose range contains the requested duration. A maximum day of 0 means “unlimited”. With no matching tier, the base daily price applies.

Can several units of the same product be rented?

Yes. Set the number of available units. A date is greyed out only when all units are already rented for that period.

Is the deposit refunded automatically?

No. It is added to the cart line at rental time and refunded via credit slip on return, from the back-office order page.

Does an accepted request create an order?

No. Accepting confirms the booking and blocks the dates, without creating a PrestaShop order. You collect payment through the channel of your choice (on site, bank transfer, payment link) and track the rental from the bookings screen.

The calendar does not show on the product page

Check that the product is configured and active in Rental – Products. Then clear the PrestaShop cache (Advanced Parameters > Performance) and, during your tests, disable combine/compress files (CCC).

The native “Add to cart” button stays visible

Hiding relies on theme selectors. Enable the Hide the native “Add to cart” button option in the settings; depending on your theme, a slight adjustment of the selectors may be needed.

The API returns 401

Check that the API is enabled in the configuration and that the token sent matches the displayed token. After regenerating the token, remember to update your integrations.

Is it compatible with PrestaShop 9?

Yes. The module is compatible with PrestaShop 8 and 9, in multistore and multilingual (FR, EN, ES, DE, IT). Price formatting uses the current Locale, in line with PrestaShop 9 practices.

Was this page helpful?

Still stuck? Contact support