- Posts: 14
- Thank you received: 1
Plugin: Bookings and configuring for vehicle hire.
- The Wheaten Terrier
-
Topic Author
- Offline
- I'm trying my best!
Less
More
3 months 3 weeks ago #372329
by The Wheaten Terrier
Tolerence costs nothing.
Intolerance is intolerable!
-- 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!
-- 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.
3 months 3 weeks ago #372339
by nicolas
Replied by nicolas on topic Plugin: Bookings and configuring for vehicle hire.
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:
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:
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 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:
Code:
{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:
Code:
{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.
- The Wheaten Terrier
-
Topic Author
- Offline
- I'm trying my best!
Less
More
- Posts: 14
- Thank you received: 1
3 months 3 weeks ago #372341
by The Wheaten Terrier
Tolerence costs nothing.
Intolerance is intolerable!
Replied by The Wheaten Terrier on topic Plugin: Bookings and configuring for vehicle hire.
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?
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.
- The Wheaten Terrier
-
Topic Author
- Offline
- I'm trying my best!
Less
More
- Posts: 14
- Thank you received: 1
3 months 3 weeks ago #372349
by The Wheaten Terrier
Tolerence costs nothing.
Intolerance is intolerable!
Replied by The Wheaten Terrier on topic Plugin: Bookings and configuring for vehicle hire.
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.
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.
3 months 3 weeks ago #372351
by nicolas
Replied by nicolas on topic Plugin: Bookings and configuring for vehicle hire.
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 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.
- The Wheaten Terrier
-
Topic Author
- Offline
- I'm trying my best!
Less
More
- Posts: 14
- Thank you received: 1
3 months 3 weeks ago #372352
by The Wheaten Terrier
Tolerence costs nothing.
Intolerance is intolerable!
Replied by The Wheaten Terrier on topic Plugin: Bookings and configuring for vehicle hire.
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.
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.194 seconds