latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Displaying buyers purchases as links?

Home Forums Community Forum Displaying buyers purchases as links?

This topic contains 2 replies, has 3 voices. Last updated by  cassel 4 years, 2 months ago.

Topic Author Topic
Posted: Thursday Oct 25th, 2012 at 4:18 pm #29694
Pam
Username: pdblizzard

I have 12 videos that I’m going to sell either “2 for $3” or “all 12 for $10”. They are one time purchases and not part of a regular subscription that gives them access to all subscription content.

Creating the products and buy buttons is a no brainer. Displaying the video itself is not a problem I have an app for that :)

my Question:
How do I display for the customer which videos they purchased once they’ve left and come back again at a later date?

If customer A purchases video 2 and video 5
If customer B purchases video 3 and video 6
If customer C purchases all 12 videos

Can I display only the purchased videos as links on their profile page?
Or even better, can I have a page that displays all the videos they purchased?

What’s the best use of scripting and conditionals to do this. An example would help me bend my mind around this :)
THANKS!

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Friday Oct 26th, 2012 at 8:33 am #29759

Hi Pam.

There isn’t a feature to list the things the user has access to, so you’ll have to code those menus yourself. What you can do is use the IDs of the posts with videos, and check each one to see if the current user has access to it and display the link if so.

There are some API functions that will help you check those permissions. http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/

If the functions available there aren’t enough, you would own database query then.

I hope that helps. :)

Posted: Friday Oct 26th, 2012 at 8:43 am #29763
cassel
Username: cassel

Just as another way to think of this. If each video was associated with a ccap (video1, video2, etc), then you could probably use the conditionals to display what the customer has already purchased (provided that they are logged in). Something like this:

You already purchased:
[s2If current_user_can(access_s2member_ccap_video1)]
    - video 1 (with the name)
[/s2If]
[s2If current_user_can(access_s2member_ccap_video2)]
    - video 2 (with the name)
[/s2If]
[s2If current_user_can(access_s2member_ccap_video3)]
    - video 3 (with the name)
[/s2If]
[s2If current_user_can(access_s2member_ccap_video4)]
    - video 4 (with the name)
[/s2If]

So whatever the customer purchased would be displayed and the rest wont. I guess it is a different way to use ccaps instead of using them for protecting content. Would that work for your need?

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.