• rhubeny76

    (@rhubeny76)


    How do I accomplish the following requirement? We are selling tickets for a dinner, some will be dining in and others will pickup their meal to go.

    To prevent the pickup meal customers from arriving at the same time, we wish to create time slots: 1) 5-6PM, 2) 6-7PM and 3) 7-8PM. Let’s say that each time slot is limited to 12 pickups.

    How do I create these time slots and allow the customer to fill in how many meals they will be picking up during that time slot, while also keeping track of how many time slots are left from previous submissions?

    Example. Customer 1 orders 4 meals and will pick them up between 5-6PM. This is a single submission that decremented the time slot availability from 12 to 8. 2nd customer orders 6 meals and will pick up during the same time slot, 5-6PM. time slot availability is now 2 (8 – 6). The 5-6PM time slot can only accommodate 2 more pickups after which it should be closed as full and unavailable.

    I have tried Select field and checkboxes but could not figure a way to do this, especially as it requires access to the total remaining availability between submissions.

    Can you offer a suggestion or solution?

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @rhubeny76

    I hope you are doing well today.

    Creating time slots will be possible by checkboxes and the end-user will be able to choose 1 or more slots with different pickups. However, Forminator core is not designed to store and display (later on) how many free slots will be available after submission. We have future tasks to support such cases, but at the moment we have no ETA when this will be implemented.

    Your scenario points more to some Appointments plugin with date and time slots, which again should be not only stored in the database but also be displayed for those that will be still available to take after submission.

    Kind Regards,
    Kris

    Thread Starter rhubeny76

    (@rhubeny76)

    Okay. Let me ask if this is possible. If I create individual number fields for each time slot (not a checkbox or selection field), is it possible with a mu-plugin to sum up previous submissions for each time slot and then hide the slot if the sum is greater than 10.

    Example: sum(slot 1) > 10 -> hide field, sum(slot2)=5 -> do nothing, sum(slot3) = 0 -> do nothing

    Can this be done and do you have sample mu-plugin code that I could use?

    Thread Starter rhubeny76

    (@rhubeny76)

    If I can sum up quantities from previous submissions in the plugin and then populate a hidden field (one for each time slot), then I can use conditional logic to hide a time slot that exceeds that maximum allowed (10 in my example).

    Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @rhubeny76,

    This might be possible with custom code but I’m afraid this will be outside the scope of support we can provide. For that, you’ll need to hire a developer to provide the required custom code for you. WordPress provides a jobs directory here https://jobs.wordpress.net/, if you need further advice about it, feel free to email [email protected].

    Subject: ATTN: WPMU DEV support – wp.org

    Please also make sure to add the link to this thread into your message.

    Kind regards,
    Zafer

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.