Skip Navigation

[Resolved] Split: Using Toolset Forms to create a specialized form

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#1909331

Hi Waqar,

thanks for your answer. To give you a better idea of the situation, I created an Admin account for you. Could you please make the next post private, so I can send you the credentials?

Also there is another topic with the same client. At the clients old site you can order some christian books through a form. Here are the requirements for the this form, which I wanted to create through Toolset forms with a Custom Post Type and some custom fileds, so that the client can edit/add products by himself. I already used WooCommerce for this on his new site, however I have to do so many customizations, that I don't want to use WooComemrce for this purpose. Here are the requirements:

  • Some Products have prices. However all prices are optional for the user to pay (donation). The prices in the form shall not be visible for the user in the order process itself, but shall be calculated by the form in the background. In the last step, before the user clicks on the order button, the total amount should be visible with a PAYPAL DONATION BUTTON (should be doable witf PP Donation button -> external plugin -> shortcode). The reason is, because it is only optional for the user to pay that price, its a donation. He doesn’t have to pay it and for that reason the amount should only be visible in the last step of the order process.
  • The articles have different prices
  • The user can only order a certain amount (maximum number) of the items (which is also different from item to item)
  • The article description can contain links, which open in a new tab
  • There should also be an option, that articles are not in stock and this should be shown in the frontend form (grayed out)
  • The Order form has to be a Multistep-Form First Page/Step -> choose the articles you want | Second Page/Step -> Enter name and address | Third Page/Step -> Confirm Order

Here is the old form from their old (current) site (you have to make an exception because there is now ssl certificate): hidden link

Thanks
Thorsten

#1909389

Hi Thorsten,

Thank you for sharing these details.

Based on the information you've shared, I feel that you'll end up needing a lot more customizations if you'll leave the WooCommerce. WooCommerce takes care of functionalities like stock management, cataloging, checkout and order management, etc, which are not available within Toolset Forms.

Have you considered keeping the WooCommerce, but only use Toolset's post form to enter products from the front-end? This would be convenient for the client, compared to going in the admin area and adding the products through the WooCommerce's product edit screen.

regards,
Waqar

#1910625

Hi Waqar,

like in this topic (https://toolset.com/forums/topic/tag-cloud-with-views/#post-1910557) you have credentials to the clients website.
The problem I currently see with WooCommerce, that it needs much customization to fit the clients needs. I already used a lot of custom code (see the custom code snippets in the "Advanced Scripts" Plugin under "Tools") and I have to make additional Code changes (for the order confirmation mail / the table with the products, which is displayed when an order is finished etc.). Also I have some doubts with the updates of WooCommerce and the reliability of that Plugin and also in regards of performance.
I wanted to make a CPT for that reason (similar to the WooCommerce one) and display the data with toolset forms. You can visit the current WooCommerce Page, if you are logged in at the clients site (see the otehr thread for the credentials) at: hidden link

You mean, for entering products to the shop I can use the Toolsets frontend form? I thought to take toolsets form for the users, who wanted to order something similar to the form at their old site (hidden link).

Thanks
Thorsten

#1913243

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.