I am trying to figure out the best way to structure something.
I will eventually be adding payment integration with this.
I have a post type called "Market Events" also a post type called Vendors
• An event will typically run all summer every Sunday
• Most event Vendors will sign up for the entire event "all summer every Sunday"
• But Vendors are also allowed to book a four week block during the event as well
• There is also the option to book a single Day of the event
What would be the best mechanism to allow Vendors to book specific days at an Event
If you need to handle date range purchases with WooCommerce, I usually suggest looking into a WooCommerce extension like "Bookings". This extension is not free, but it is designed to help you handle scheduling events over dates and date ranges very effectively in WooCommerce. It can be used to book hotel rooms, schedule appointments, and so on. Otherwise, you may need a significant amount of custom code depending on the features you want to include.
If you're looking for a solution that does not use a separate plugin or extension, then you can use Forms and Forms Commerce with WooCommerce. Here is a very simple example that shows the process.
First, create 3 Products in WooCommerce that represent each type of registration:
- Single day access
- Four weeks access
- Full event access
Now create a new post type called "Market Event Registration" or something similar. Add 2 custom date fields to capture the start and end dates. Then create a new Form that creates these new posts. Turn Forms Commerce on and connect this Form to your 3 Products by adding a select field, as described in this document:
https://toolset.com/documentation/user-guides/using-cred-commerce-to-add-payments-to-forms/
In the Form, your Vendors will select their desired membership and choose the start and end dates. When they submit the Form, the correct Product will be added to their cart and a new Market Event Registration post will be created on the backend. When the Vendor completes payment, the system can automatically publish their Market Event Registration post. This is the most simple example, but in most cases it isn't good enough because you want to be sure the Vendor selects the correct date ranges based on the Event start and end date, the type of membership they purchase, and maybe other requirements. That will require custom code using our PHP APIs. If you're not a skilled developer, the Bookings extension will probably be more cost-effective.
Let me know if you have additional questions about this, I'll be glad to discuss in more detail.