Skip Navigation

[Resolved] Create a customized download service for Users

This support ticket is created 4 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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 4 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1392823
downloads.png

I want to offer customized download service to users. I already have the download plugins etc to link to amazon. I'm guessing I could use toolset to create a category (My-Video-Downloads) where I as Admin could add File Download links where only the authorized user will see their available download. I'm guessing there is a way to add the "user id" when creating a new field (so that each file uploaded for specific user would show, just like we did with the leads)

then creating a "view" for the my-downloads page that is only for logged in user (any downloads associated w them)

attached is a mock up of the video download page (saying user had 4 available videos to download etc)

#1392965

Hello,

In your case, it needs to setup many-to-many relationship between posts and WordPress users.

You try setup such kind of relationship with a intermediate post type, for example:
1) Create two post types:
- Downloads, with custom field "file Download link"
- Members, each member's post author is different WordPress user, one WordPress user can have only one member post

2) Setup many-to-many relationship between post type "Downloads" and "Members"
Edit "Downloads" posts, related them with other "Members" posts

3) When user log into your website, show them a page "My downloads", in this page, display a nested view:

a) Parent post view
- Query "Members" posts
- Filter by post's author is current logged-in user
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
- in view's loop, Display below child view

b) Child post view
- Query "Downloads" posts
- Filter by post type relationship between post type "Downloads" and "Members"
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
- Display "Downloads" post information + field "file Download link"

Above page can achieve what you mentioned in screenshot:
https://toolset.com/wp-content/uploads/2019/11/1392823-downloads.png

More help:
https://toolset.com/forums/topic/connect-users-with-diffrent-role-to-custom-post-type/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.