We wish to add a 'save' / 'favourite' type function to our sites that use Toolset.
Saw this great vid by Agnes: hidden link
From what I can see, Toolset has no function for a wish-list or favourite type option.
So I plan to use the comparison set up but swap our that word to 'favourite'.
So visitors looking through our sites of numerous properties can at least save temporarily and then look up their favourite properties in a grid to browse.
1 - So, Agnes adds the checkbox to each item in the view grids, am I able to place this checkbox with a link to the compaire/favourite page in each custom post type?
Ours look like this: hidden link
2 - Finally, are the items saved just temporary or are they cookie based so a visitor can go back another time?
1 - So, Agnes adds the checkbox to each item in the view grids, am I able to place this checkbox with a link to the compaire/favourite page in each custom post type?
2 - Finally, are the items saved just temporary or are they cookie based so a visitor can go back another time?
Hi, the approach in Agnes's video doesn't seem suited to what you want to achieve, because nothing is "saved" for any amount of time, only as long as the User has that comparison results page URL available. If they leave the site or go back to the comparison page, those checked items are not "remembered" by the system in any way. A User cannot browse different individual posts, add checkboxes, and compare them later. The only place to add checkboxes is in a page of results from a View. Then submitting the form to Compare (or Favourite in your case) only displays those selected posts in the form. Nothing is saved to indicate the User interacted with these posts or wants to see more information about them in a later session, the only reference is in the URL created when the User submits the form.
The best approach for setting up Favourites in Toolset is a bit more complex. First, you need a way to create post relationships between individual posts and the User. That's not directly possible, so there is a proxy technique described here: https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/
You can create a many-to-many post relationship between proxy posts and the Portfolio posts, then use Views with post relationship filters to display a User's favourites.
There are other approaches that are less flexible that do not rely on a proxy post type or post relationships. Basically you can create a custom repeating field on the User's profile that stores Favourited post IDs. To Favourite a post, a User would submit a Form from the single post (or a custom search) that edits their own profile, storing the current post's ID in the repeating field. Then you have the ability to filter a View of posts by this repeating field to determine if a post is a Favourite or not.
Let me know if you'd like more information about either approach.
Thanks for your reply. I did try Agnes's way of doing this just to test here : hidden link
From that and as you suggested this only works within itself because it's all part of the view which is a shame as it does exactly what I need.
I also added a 'add to favourites' check box on this listing under AT A GLANCE: hidden link
And then added a FAVOURITES link in the header linking to the results page however this of course didn't work.
It isn't important that a user can go back later to find their favourites, systems we have used in the past use cookies however I do not wish to use another plugin.
I guess from your explanation above I would ask and confirm, is there is now way to easily adapt and make work what I have already done?
If not is there a straightforward way of accomplishing something similar without sign up forms and there is no need to remember after the visitor has left the site.
I guess from your explanation above I would ask and confirm, is there is now way to easily adapt and make work what I have already done? If not is there a straightforward way of accomplishing something similar without sign up forms and there is no need to remember after the visitor has left the site.
You can repurpose the Comparison View, sure. It will work exactly like it works now. However, there is no easy way to add a Favourites button to the single Portfolio template and then display a corresponding Favourites View on another page without custom code. You mentioned cookies, but Toolset doesn't have anything like this built-in to the system. It would require another 3rd-party plugin or custom JavaScript programming.
Both of the workarounds I described earlier require User profiles, so I don't have a good workaround that doesn't require some type of registration.
a User would submit a Form from the single post (or a custom search) that edits their own profile, storing the current post's ID in the repeating field. Then you have the ability to filter a View of posts by this repeating field to determine if a post is a Favourite or not.
So, out of curiosity what is this process using Toolset please?
It would be important that the favourite button is on every custom post.
A user can remove etc saved in their saved profile.
And that the link to login into their account can be anywhere on the site.
Just considering that if this is a big task, whether it is worth adding this albeit nice function, to the sites we intend to use Toolset for.
Just considering that if this is a big task, whether it is worth adding this albeit nice function, to the sites we intend to use Toolset for.
Whether or not it's a big task depends to some extent on your understanding of the concepts involved and your skills with custom code, so I can't answer that very well offhand. After you have read through the link above, I think you should be able to tell if this is something you want to try or not.
Thank you for your reply. Ok read through the link, hmmmm!
Toolset is great for putting together step by step videos, there is a vid for nearly everything relating to Toolset. These tend to make sense to new people like myself to see by example and follow.
Is there a video that covers this? I'll never be able to make sense of what you suggest to Team DNK and initially Charles in an earlier thread.
I have watched this out of interest, membership using Toolset: hidden link
Guess it is similar as I am looking for membership of a kind.
Not that what you're explaining isn't clear, I just don't understand much of it. Toolset can be complicated enough and I have learnt much from Toolset videos.
Worth an ask, if not then I think this will be beyond me.
Is there a video that covers this?
No, this is a very custom implementation that isn't covered step-by-step in the video guides or documentation. I'm able to assist and troubleshoot, but not create this feature for you from scratch. There are other 3rd-party plugins out there that handle Favorites very well, and it's not something Toolset is designed to accomplish easily. If those 3rd-party plugins store Favorites as custom post data, then it may be possible to add Favorites filters to Views as described in this ticket: https://toolset.com/forums/topic/create-a-query-filter-in-a-view-to-filter-on-wp-favorite-posts/
You can search the forum for other Favorites tickets to see other solutions that have been put together for other client cases.
Guess it is similar as I am looking for membership of a kind.
Membership works by assigning a specific User role to each User. It does not apply any information to each individual post, so it wouldn't help you create Favorites like you have described.