Hey Guys,
Ok so real simple. I am not sure how to link bookings made to equipment (which have a relationship) to the user who owns the equipment on which the bookings were made...
So lets say, I have 2 people and the following scenario...
User 1 has equipment listed, user 2 wants to book it, so they place a booking request, and after booking it user 1 can approve/decline it. but I need a way to link the booking post type submission(cred) to the user 1 who is the owner of the equipment that was booked.
I need user 1 to be able to see a list of bookings made, with a link in the list, that links to the equipment post type (for which a relationship already exists)
Hello,
How do you setup the relationship between post types "equipment" and "bookings"?
I assume it is one-to-many post type relationship "equipment-bookings" between post types "equipment" and "bookings".
You can try these:
1) Display a wordpress page to User 1,
2) In this wordpress page display a nested view:
- Parent post view, query "equipment" posts, filter by post's author is current logged in user,
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/#post-author-is-the-same-as-the-logged-in-user
in view's loop display below child view
- Child post view, query "bookings" posts, filter by post type relationship "equipment-bookings",
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/#3-creating-a-view-that-lists-the-children-of-the-parent-post
in view's loop display a edit form link
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/
Setup above edit "bookings" form to update the "bookings" post as approved, for example update a custom field "bookings" to value 1.
Hey Guys,
I am completely lost honestly. Would you be able to help me check what I am doing wrong?
Yes, please provide a test site with the same problem:
1) deactivate other plugins, and switch to wordpress default theme 2019
2) provide test site credentials in below private message box, also point out the problem page URLs, thanks