Skip Navigation

[Resolved] Allow front-end user to select posts to be added on a list.

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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 1 year, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#2598117

SD

Tell us what you are trying to do?
I would like to have a CPT, for example "equipment", the admin will be adding equipment to the site along with some custom fields atc...one of those custom fields will be price.

Then in the front-end i would like the visitor/user to be able to select multiple of those "equipment" posts to be added in a list(may be this can be done by forms ?)...at the end, the user should be able to see a list with the selected equipment along with a total of the price custom fields of all the selected equipment. If the user can also save this list and maybe print it then it would be even better.

Is there any documentation that you are following?
Not really, i couldn't find anything.

Is there a similar example that we can see?
It's kind of a cart but instead, it would be a list with no e-commerce functionality...if you think I could achieve this with a combination of woocommerce and toolset then I'm open to suggestions...if we can customize the wording and the appearance of the cart using blocks or views then this might be possible and probably better because we will be able to add ecommerce if need in the future...but for now i just need to get the total and instead o checkout have the option to book the equipment(it is for rending film production equipment)

What is the link to your site?
Not available since I'm still considering how to build this using toolset.

#2598447

Hello,

I suggest you try these:
1) Setup two post types:
- list
- equipment

2) Setup many-to-many relationship between "list" and "equipment"

3) In single "list" post, display
A) a relationship form, let users to connect it with other "equipment" posts:
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/
B) Post view:
- Query "equipment" posts
- Filter by post type relationship between "list" and "equipment"
- In view's loop, display "equipment" post information
https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items
Create a custom shortcode to calculate the total price from above "equipment" posts
https://developer.wordpress.org/reference/functions/add_shortcode/