Loving Memberstack so far. I have a website that allows users to book travel activities. I have a ‘book now’ button displayed for premium members. Once they book their activity, I would like to hide the activity to the member so that they can’t rebook. To do this I would either need to hide the CMS item or the ‘book now’ button (just for that member).
Ah this is good to know. Please update me when you have a solution!
As a side-issue, I’d love to display the activities booked by a user in their dashboard. I’ve seen that I can have user-specific dashboards, but is there any way to display activities booked (I would register that a user has booked an activity when they click ‘confirm’ on a booking).
Either way I’m super excited for the future of Memberstack
My site records and displays a user’s activities. It updates a log when the user downloads a document or emails a document. I use MemberStack’s metadata to log the activity. For example, when a user clicks a download button, I add downloading information to an array in metadata. Here is example code for logging downloads.
MemberStack.onReady.then(async function(member) {
var metadata = await member.getMetaData()
if (!metadata.Downloads) {
var memberActions = {
Downloads: []
}
member.updateMetaData(memberActions)
}
metadata.Downloads.push({
createdate: createDate,
filename: attachmentName
});
member.updateMetaData(metadata);})
For retrieving the download activity to display on the user’s dashboard, I use the following to get the contents of the Downloads array (which I then parse and display in a table on the dashboard).
MemberStack.onReady.then(async function(member) {
var metadata = await member.getMetaData()
var downloadData = metadata.Downloads;
//Then parse downloadData and display the contents in the dashboard
})
Thanks Scott, this is fascinating. I’m not much of a developer but I’m going to investigate and see what I can do with a friend of mine. Thanks so much!