• Resolved heywatchoutdude

    (@heywatchoutdude)


    Hi,

    I would like to know if the following options can be implemented via the shortcode [app_list]:

    1. Remove “Print All” option: This option should either be removed or not displayed.
    2. Display All Bookings: The shortcode should always display all bookings, instead of limiting it to 10 (this is especially noticeable on mobile devices).
    3. Define Start and End Dates:
      • start_date: Always the current date.
      • end_date1: From Sunday to Wednesday.
      • end_date2: From Thursday to Saturday.
      Note: The end_date1 and end_date2 should automatically update on a weekly basis.

    Goal: To display clients from Sunday to Wednesday, and from Thursday to Saturday, depending on the current day.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Hakan Ozevin

    (@puckrobin)

    Hi,

    1. Add this line to WP BASE > Tools > Custom Functions or to function.php of your theme: add_filter( 'app_list_show_print', '__return_false' );
    2. Shortcode displays all bookings already. Bookings are paginated and pagination can be selected as 10, 25, 50, 100 or all booking at the front end. Do you mean there should not be any pagination?
    3. In “start” and “end” attributes, you can use PHP strtotime parameters. For example [app_list start="today" end="Wednesday"] or [app_list start="today" end="+4 days"]
      Also see: https://www.php.net/manual/en/datetime.formats.php

    Cheers,
    Hakan

    Thread Starter heywatchoutdude

    (@heywatchoutdude)

    Thanks it worked! 🙂

    Regarding 2. – Yeah I don’t want any pagination, is that possible?

    Plugin Author Hakan Ozevin

    (@puckrobin)

    Custom Functions or functions.php:

    add_filter( 'app_js_data', 'app_js_data' );
    function app_js_data( $data ) {
    $data['page_length'] = 1000;
    return $data;
    }

    Display Settings > Advanced > Additional css Rules (Front end):

    .app-list-wrapper .dataTables_length {
    display: none;
    }
    Thread Starter heywatchoutdude

    (@heywatchoutdude)

    Awesome – thanks, it worked!

    One last additional question:

    Is it possible to change the service availability (set holidays so the service should be unavailable) by clicking on a toggle button?

    Example: When the status is “Closed,” the service should be unavailable, and all upcoming bookings should be canceled. On the other hand, when the status is “Open,” the service should be available.

    I have tried it with the following function but sadly no success:

    Note: The service has ID 1

    add_filter('wp_base_booking_validate_reservation', function($valid, $service_id) {
    $status = get_option('header_html_1', 'Open');

    // Define the services that should be blocked when closed
    $blocked_services = [1]; // Replace with your actual service IDs

    if ($status === 'Closed' && in_array($service_id, $blocked_services)) {
    return false; // Block only specific services
    }

    return $valid;

    }, 10, 2);
    Plugin Author Hakan Ozevin

    (@puckrobin)

    We don’t have a “wp_base_booking_validate_reservation” filter hook. So that function cannot possibly work.

    You can use the integrated Limited Availability addon:
    – When enabled, service is only available at the selected days in its full calendar. If you select no dates, service is always unavailable
    – When disabled, service is available according to its working hours

    Cheers,
    Hakan

    Thread Starter heywatchoutdude

    (@heywatchoutdude)

    Can it be triggered via functions? If yes, how is the filter hook called?

    Plugin Author Hakan Ozevin

    (@puckrobin)

    Service availability affects front end calendar generation. So, it starts from the beginning of everything. What you are asking doesn’t make sense.

    What are you trying to do?

    Thread Starter heywatchoutdude

    (@heywatchoutdude)

    The service should be set to “Holiday” for X days/weeks/months as soon as I click the button and removed when I click it again.

    Plugin Author Hakan Ozevin

    (@puckrobin)

    So you want to limit bookings that user can book within a predefined time interval dynamically?

    If not dynamically, you can use the integrated Quotas addon. For example one booking per week per logged in user. User must be logged in which you can achieve by setting Logged in Required setting as “Yes”.

    But if you want it dynamically and for X days, that can only be done at the front end with Javascript and it can only be done with serious custom coding which will not be free.

    If you are interested, please contact us using the Contact Form on our website. In your message please provide a link to your booking page because that will depend on the booking view you are using.

    Cheers,
    Hakan

    Thread Starter heywatchoutdude

    (@heywatchoutdude)

    Thanks for your help, I will contact you (again) in case I need further help.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Customize [app_list]’ is closed to new replies.