Thanks for writing back.
If you'd like to explore the option of managing this without WooCommerce, here is a structure that you can try out:
Notes:
- In this approach, a visitor will be able to place the order of only 1 product in a single order. To order a different product he/she can place a new order.
- Toolset Forms don't include a built-in feature to create multi-step forms. To achieve something similar, you'll create the form first and then use custom script, to make the form's different sections appear, step-by-step:
1. You can add two CPTs:
a). Products
b). Orders
2. These two CPTs will have a one-to-many relationship between them, so that one Product can have many Orders.
3. You'll have the custom fields like optional price, maximum allowed number per order quantity and the in-stock quantity etc with the Product CPT.
4. Order information fields like ordered quantity and contact information of the person ordering, would be saved with the Order CPT.
5. For order placement, you'll basically use a new post form that adds entries into the Order CPT and this form will also have a selector to choose a product.
6. To validate the order form that someone can't order more than allowed quantity or the in-stock quantity of the selected product, you'll need to add a custom function attached to the "cred_form_validate" hook:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate
7. When the order has been placed, you'll also need a custom function attached to the "cred_save_data" hook, to subtract the amount ordered in the current order from the in-stock quantity of the ordered product:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
I hope this makes sense and please let me know if any point is not clear.