Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Don't allow booking the current day
(1 viewing) (1) Guest
Support forum for users using free edition of Book it!. These forums are for mutual help among users.

NOTE: Due to our capacity limitations, ARTIO does not monitor this forum category regularly. If you want direct support from ARTIO, please start a ticket at Support Dashboard. If you have no support ticket available, you need to purchase it. .
  • Page:
  • 1

TOPIC: Don't allow booking the current day

Don't allow booking the current day 11 years, 12 months ago #29889

  • kami
  • OFFLINE
  • Posts: 19
Hi,
I'd like to ban booking for the current day when using hourly booking.
Is it possible?
Thanks.

Re: Don't allow booking the current day 11 years, 12 months ago #29907

  • jitr
  • OFFLINE
  • ARTIO Support
  • Posts: 1432
Hello, try this simple improving

In administrator/components/com_booking/helpers/booking.php

Is code looks like

 
/**
* Get week calendar for selected subject.
*
* @param TableSubject $subject
* @param BookingCalendarSetting $setting
* @return stdClass
*/

function getWeekCalendar(&$subject, &$setting, $count = 'week')
{
$mainframe = JFactory::getApplication();
/* @var $mainframe JApplication */
$current = JFactory::getDate();
/* @var $current JDate */
$config = &AFactory::getConfig();
/* @var $config BookingConfig */
 


Replace with

 
/**
* Get week calendar for selected subject.
*
* @param TableSubject $subject
* @param BookingCalendarSetting $setting
* @return stdClass
*/

function getWeekCalendar(&$subject, &$setting, $count = 'week')
{
$mainframe = JFactory::getApplication();
/* @var $mainframe JApplication */
$current = JFactory::getDate('tomorrow');
/* @var $current JDate */
$config = &AFactory::getConfig();
/* @var $config BookingConfig */
 


I'm not sure if it will works with all PHP versions.
ARTIO Support Team

Re: Don't allow booking the current day 11 years, 12 months ago #29911

  • kami
  • OFFLINE
  • Posts: 19
Works for me, thank you for the great support!

Re: Don't allow booking the current day 11 years, 12 months ago #29914

  • kami
  • OFFLINE
  • Posts: 19
I shouldn't count the chickens before they're hatched :-)
But not showing the current day is not the solution for my customer.
He wants to show the current day but without the possibility to book free times.
(Because the customers have to call by phone to make a reservation for the current day)
  • Page:
  • 1
Přihlášení uživatele Prázdný