• Hi

    Is there a way to list all the products (custom capabilities) a user has access to on a single page? — without creating a new page for each user?

    Eg. User1 can access ccaps apples, oranges so when they login I would like them to see links to the apples, oranges categories

    Whereas User2 only has access to apples and so when they log in I’d like them to see only the link to the category apples

    Thanks

    https://wordpress.org/plugins/s2member/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, use API scripting, the s2M’s conditions. Show need content for apples only if the exactly user has ccap “apples”. This way on a single page users will see different links, depend of what ccaps he have.

    Thread Starter fastfingerfreddy

    (@fastfingerfreddy)

    Ok thanks 😀
    Is there anywhere I can get the script or shortcode for this?

    Thanks
    Rich

    You can also use the conditional to list the ccaps.
    For example, you can have something like this:

    Here are the classes you currently have access to:
    [s2If current_user_can(access_s2member_ccap_product1)]
    *put a link to the particular product page*
    [/s2If]
    [s2If current_user_can(access_s2member_ccap_product2)]
    *put a link to the particular product page*
    [/s2If]
    etc.

    That way, if the user is logged in AND has the particular ccap, the link will display, otherwise, it wont.
    That means you can have a single page, and everyone will only see the products they are allowed to access.

    I am using this on my own site, and i added a link to PURCHASE the product they don’t have access, as a way to promote them, but that is only a personal choice.

    Here is my own My Account page, for illustration purposes:
    http://scrapbookcampus.com/my-account/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Links to users products (custom capabilities)’ is closed to new replies.