Capacity isn't the right answer - what is?

I have multiple sites I am setting up with Appointments+ for this organization.

They may have 1 or 2 boats available which I am setting up as Service Providers (dummy). Each boat has 10 available seats. We want the seats to be able to be booked individually or in groups less than 10. Is that possible?
Example:
Group 1 wants to book 6 seats at 10 on Monday
Group 2 wants to book 3 seats at 10 on Monday
Individual 3 wants to book 1 seat at 10 on Monday

How would I set up to allow this?

Thanks, Val

  • Michael Bissett

    Hey @Val, hope you're doing well today! :slight_smile:

    To start off, I'd like quote the FAQ entry for this inside of Appointments+, as it lays out the situation well:

    I want to accept more than one appointment applications for each time slot. Entering higher numbers in "capacity" field in Services tab does not work. Why?

    Please note that Appointments+ is designed for one-to-one appointments, that is, one service provider serving a single client at a time and to manage available workforce. Capacity field is for limiting the workforce, not for increasing it. You have two alternatives to achieve this: a) Use dummy service providers b) Add these codes in functions.php and modify as required:

    function increase_capacity( $capacity, $service_id, $worker_id ) {
        return 10;
    }
    add_filter( 'app_get_capacity', 'increase_capacity', 10, 3 );

    This filter will NOT work if there is a single provider giving the selected service. Please also note that this is a kind of "hack" and when you have more than one service provider, this function may not work as expected in regards to working hours, as "virtual" providers will not be bound to working hours of existing providers.

    Given the mention of the virtual providers, I'd want to have be set up as real providers instead.

    Now, as to the booking of more than one appointment... you can install our MarketPress plugin on your site:

    https://premium.wpmudev.org/project/e-commerce/

    And enable the MarketPress integration inside of:

    Appointments -> Settings -> General

    By checking the "Integrate with MarketPress" & "Create an Appointment Product Page" boxes. :slight_smile:

    That'd allow you to book more than one appointment (by adding each appointment to the cart), and checking out that way.

    Hope this helps! :slight_smile:

    Kind Regards,
    Michael

  • Val

    Thanks for the response Michael - I'm afraid I'm not clear on the variables/code shown:
    `function increase_capacity( $capacity, $service_id, $worker_id ) {
    return 10;
    }
    add_filter( 'app_get_capacity', 'increase_capacity', 10, 3 );

    What do the numbers in this code indicate? i.e. return 10 (is this the total capacity per appointment?)
    And then the 'app_get_capacity', 'increase_capacity', 10,3

    Is the get capacity the total capacity? What does increase_capacity indicate?

    Anything further you can share to help me understand what should be modified in this code to achieve my goal

    Val

  • Val

    Hey @Michael - following up here to see if you can share a bit more info. I've loaded Market Press and activated it. I see the products area on my left nav so I assume it is installed properly.

    In Appts+ I found "appointments in product page" in the add-ons but I'm not finding either of the items you spoke of above: "Integrate with MarketPress" & "Create an Appointment Product Page" on my general settings page. Where are these supposed to be appearing?

  • Michael Bissett

    Hey @Val! :slight_smile:

    What do the numbers in this code indicate? i.e. return 10 (is this the total capacity per appointment?)

    Yes, the 10 in "return 10" is referring to the total capacity per appointment. :slight_smile:

    So there'll be a max capacity of 10 appointments per timeslot on the calendar.

    And then the 'app_get_capacity', 'increase_capacity', 10,3

    Is the get capacity the total capacity? What does increase_capacity indicate?

    "app_get_capacity is the filter we're hooking our "increase_capacity" function into (in order to get it to execute), the 10 would be the priority for this function, and the 3 would be referring to the amount of arguments that the function accepts.

    None of this would need to be modified in your case. :slight_smile:

    In Appts+ I found "appointments in product page" in the add-ons but I'm not finding either of the items you spoke of above: "Integrate with MarketPress" & "Create an Appointment Product Page" on my general settings page. Where are these supposed to be appearing?

    I've attached a quick screenshot showing that here:

    http://screencast.com/t/OgsKPDf0

    Hope this helps! :slight_smile:

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.