Skip Navigation

[Resolved] Building an order form

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 20 replies, has 2 voices.

Last updated by Minesh 1 year, 2 months ago.

Assisted by: Minesh.

Author
Posts
#2651905

Hello,
I'm creating a site for a client who sells custom motorcycle parts. They are pieces that he produces to order and can customize. He would not like to use an e-commerce approach for various reasons (one of these is that the price of the final order varies based on a series of variables) but would like to give the user the possibility of ordering items simply by selecting them from the site and sending a simple email to the owner. I'm trying to build the system so that it is as practical as possible and more similar to an e-commerce for the user and I would like help on how to obtain a practical result. The ideal would be to be able to store in a temporary table all the articles that the user selects by clicking on a hypothetical "order" button, but if this is not possible for various reasons, another solution would be to have a "ORDER FORM" page with a dynamically loaded check-list of the products available in the catalog and the possibility to tick which item you want to order and possibly the quantity. Is it possible to obtain such a result? Do you have any suggestions on how to achieve this?

#2651967

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Its your choice what way you want to go as using Toolset you can lets say give user possibility to save the order item to a custom field so the custom field should store the item id (multiple item ids).

Toolset do not use the custom table, but you may also create custom post type "Orders" and save the selected item ids to the post. It may require to use Toolset hooks with some custom code but I would suggest you should first use our free test platform http://www.discover-wp.com and use any of the reference site we offer and you can play with it and check the possible ways you can achieve this.
- https://discover-wp.com/site-templates/

Toolset offers Toolset Forms which you can use if you use form to send email notification.
- https://toolset.com/course-lesson/send-notifications-when-someone-submits-the-form/

You can also use the Framework Installer plugin using which you can install any of the reference site we offer to your local server.
- https://toolset.com/course-lesson/using-framework-installer-to-install-reference-sites/

#2651991

Hello, thanks for the reply.
Could you point me to a reference site that actually implements a somewhat similar procedure? Otherwise would it be possible to have general examples on how to achieve this?
Thank you

#2652173

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You may check the following reference site:
- https://discover-wp.com/site-types/cb-properties-real-estate-site/

Where form is used with notification feature but not exactly how you want.

As shared - Its your choice what way you want to go as using Toolset you can lets say give user possibility to save the order item to a custom field so the custom field should store the item id (multiple item ids).

Toolset do not use the custom table, but you may also create custom post type "Orders" and save the selected item ids to the post. It may require to use Toolset hooks with some custom code.

First of all - you should make a choice what way you want. You want to create a "Orders" post type add the items (product ids) that should be stored to custom field as multiple ids using repeating field.

Its kind of favorites feature, please check the following tickets that might help you:
- https://toolset.com/forums/topic/best-approach-to-creating-user-favorite-posts/
- https://toolset.com/forums/topic/add-post-to-a-favorite-list/#post-459894
- https://toolset.com/forums/topic/display-user-favorites-in-a-view/

#2652387

I have used Toolset forms to create and modify content and to send notification to different users, I don't need help with that. I would like users to be able to view "products", tick a checkbox on the single product and be able to have a summary email sent with all the selected products. I need to get advice on the best way to achieve this.. It is perfectly ok to create a cpt called "ORDERS", this approach gives me the additional bonus to store valuable informations. I don't have the whole process clear in my mind, so can you please help me?

#2652437

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Here is a sandbox site:
- hidden link

You can consider it "Tours" as your products, how exactly you want to offer selection to users?

Here is a page that list all "Tours":
- hidden link

#2652449

In my mind I was imagining it this way: adding a checkbox to each product. Users select all the products they want. Once they're finished they click on ORDER button and this creates the order and notifies both the owner and the user.
If this is not possible or too cumbersome, the alternative would be a button link at the end of the product catalog, that allows the user to create an order : the toolset form lists a dynamically generated grid from the product catalog with a checkbox on every row, so that the user can select what products they want. The optimal would be if I could select the products having two filtering fields that are: motorbike make -> motorbike model -> dynamically created list of the products. At the end the owner gets notification of the order created with all the products ordered in the body of the message. I really hope I explained the process clearly enough...

#2652579

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Here is a sandbox site:
- hidden link

I've added the form that is used to create new order (I've created post type "Order"):
- hidden link

I've created the following custom field group that holds orderids and user_id:
- hidden link

Here is a page that list all "Tours":
- hidden link
Where:
- you can see I've added the checkbox to each item.
- A form after the view that holds the order ids and user ids so we can identify what orderids (productids) are selected by specific user.

On the above page when you select checkbox you will see that the orderid textbox is updated with the selected checkbox id and when you save the form it should be updated.

Does this workflow help you?

#2652609
Screenshot 2023-10-13 at 17.18.54.png

Thank you, Minesh It's definitely a great start. I would still need to add quantity and make it a little more "presentable" for the user, but at least I can study the way you implemented it.
I checked the "orders" post type tho, in the ORDER IDS field it is not storing anything, I attached a screenshot.
Is that ok because you didn't finish the whole procedure or is it a bug?

#2653127

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you, Minesh It's definitely a great start. I would still need to add quantity and make it a little more "presentable" for the user, but at least I can study the way you implemented it.
==>
Where you want to add quantity, you want quantity per product or one quantity box with the form that should be universal for all product?

#2653131

Hello Minesh,
ideally I would need a quantity field for every product

#2653737

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've added the quantity box to each item as you can see with the following page:
- hidden link

But I would like to know how exactly you want to pair and store them. Do you want to have repeating field for order ID and another repeating field for storing quantity?

OR

you want to have repeating field group?

#2653741

I think it would be better to have a group field, so we know which quantity is associated with which product, but you are the expert, I will follow any suggestion you have!
Also Would it be too much of a hassle storing both id and product name? It would be easier for the website owner to "decipher" orders and easier on the user to see exactly what they're ordering

#2653745

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please tell me set of fields you want to store with repeating field group in one row?
- product ID
- product title (name)
- quantity
- any other(?)

If I will know from first then it will help to to build solution accordingly.

#2653801

PRODUCT ID
PRODUCT TITLE
QUANTITY
will be more than enough. Plus, once I see how you build that, in case I will add more myself, should the client need it
Thank you!