Plugin: Bookings and configuring for vehicle hire.

  • Posts: 14
  • Thank you received: 1
  • Hikashop Business
4 days 2 hours ago #372329

-- HikaShop version -- : 6.5.0
-- Joomla version -- : 5.4.6

Hello,

I am using the Bookings plugin and struggling to configure it for a single vehicle hire.

What I have tried:
Advanced Date picker in a custom field on table "Item" and/or "Order".
When "Item" is selected, it displays the date picker and has the Range set to Yes so to and from dates can be picked. It calculates the number of days and displays correctly.
The problem:
The product listing has a price but it does not increase with the number of days selected.

In the plugin settings it has the field to select a custom field for tracking but that is for the "Order" table. The product listing Booking settings is for the table "Item".

I'm totally at a loss as to what I am doing wrong.

How do I configure the settings so selecting two days will double the product price, three days will triple the product price, etc?

Please help!


Tolerence costs nothing.
Intolerance is intolerable!

Please Log in or Create an account to join the conversation.

  • Posts: 85786
  • Thank you received: 14079
  • MODERATOR
3 days 13 hours ago #372339

Hi,

The Bookings plugin manages availability (which dates a vehicle is free, and blocking dates already booked). It does not change the price by duration, which is why nothing you set there makes the price grow with the number of days, and the field it asks for is only for availability tracking.

The price-per-number-of-days part is done by a different plugin: the Calculations plugin (our price-formula plugin). It can read your Advanced Date picker range field, turn the selected range into a number of days, and multiply the price by it:

Setup:

1. Install and enable the Calculations plugin (System > Plugins, group hikashop). If you do not have it yet, it is available on our marketplace:
www.hikashop.com/marketplace/product/148...ce-calculations.html

2. In its settings, add a formula:

{price} * {your_date_field}

where your_date_field is the column name (the namekey) of your Advanced Date picker custom field, the one you set with Range = Yes. The plugin recognises the range value and replaces that tag with the number of days.

So a 2-day range gives price x 2, a 3-day range gives price x 3, and so on, and the price updates on the product page as the customer changes the dates.

One detail on counting: the number of days is the difference between the two chosen dates (minimum 1), so the 10th to the 12th counts as 2 days. If you want that to count as 3 (inclusive of both ends), use:
{price} * ({your_date_field} + 1)

Keep the Bookings plugin enabled too if you want it to prevent the same dates being booked twice. The two plugins do different jobs: Bookings handles availability, Calculations handles the price.

The following user(s) said Thank You: The Wheaten Terrier

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 1
  • Hikashop Business
3 days 11 hours ago #372341

Hi Nicolas,

Thanks for the super speedy response, much appreciated.

Plugin purchased and installed.
Formula you gave resulted in the follow to hire a camping trailer at £24.95 per day:

Your dates: Wed 24/06/2026 - Wed 01/07/2026

£505,502,568,800,000.00

WOW, I'm rich!

The product has the price set to £24.95.
Quantity input set to "None".

The formula in the plugin is:
{price} * {hire_start_date}

Any suggestions to why I'm now so wealthy please?


Tolerence costs nothing.
Intolerance is intolerable!

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 1
  • Hikashop Business
3 days 8 hours ago #372349

Having "looked" closer at the numbers being returned, the plugin is taking the date and multiplying it against the price

It calculates the number of days between the start date and end date then displaying it on the screen but it is not passing that number of days to the plugin.

I've tried so many different combinations of custom fields including a separate start and end date custom fields, epic fail.

So very confused.


Tolerence costs nothing.
Intolerance is intolerable!

Please Log in or Create an account to join the conversation.

  • Posts: 85786
  • Thank you received: 14079
  • MODERATOR
3 days 8 hours ago #372351

Hi,

The issue is that I was looking at a prerelease version of the calculations plugin. Sorry for that.
I've made the release for the plugin today:
www.hikashop.com/marketplace/product/148...ce-calculations.html
Download the latest version of the plugin and install it on yours website and it will then work properly.

The following user(s) said Thank You: The Wheaten Terrier

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 1
  • Hikashop Business
3 days 6 hours ago #372352

Nicolas, tu es très vilain ! Mais je te pardonne, car le plugin fonctionne à merveille maintenant. Merci pour ton aide et, comme toujours, pour ton excellent service client.

Cheers,
Z.


Tolerence costs nothing.
Intolerance is intolerable!
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum