PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

CCap: Paying Customers Unable to Access Pages They Paid For

s2Member Plugin. A Membership plugin for WordPress®.

CCap: Paying Customers Unable to Access Pages They Paid For

Postby ownit01776 » November 2nd, 2011, 10:41 am

I set my Custom Capability in my PayPal buttons, confirmed that the value set for each button showed up in the users profile, and added the function to the Custom Capabilities widget on my Content pages. But when paying customers click on the Content page that they paid for (after registering and logging in) they keep getting redirected back to my Products page. Does anyone know what could be causing this?
User avatar
ownit01776
Registered User
Registered User
 
Posts: 7
Joined: October 31, 2011

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby Cristián Lávaque » November 2nd, 2011, 4:56 pm

Did you check if they actually got the custom capability access added to their accounts? Check in their profiles if they have it.

Also, are you requiring more than one custom capability per page? If so, the user will need all the ones you add to the box to be allowed viewing it.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby ownit01776 » November 2nd, 2011, 5:18 pm

Yes. Their ccap was added to their accounts when I checked they're profiles.

And for some reason I think this just started working because my beta testers are telling me, now, that they can access the Content page they weren't able to access before. Yesterday, they kept telling me whenever they clicked on any link, even the link to the Content page they paid for, they got redirected back to my Products page. But when I use their username & passwords I can access the page just fine...and they're telling me they can access the page fine now too. That's weird because I didn't change anything on my end.

Now I just need to create a page to redirect them to when they try to access pages they did not pay for. Right now, they just get redirected back to my Products page without anything telling them why they were redirected there.

Thanks anyway for assisting.



p.s.

Since I'm only using one Level -- Level 1 -- I included 1993 for Custom Capabilities in the Paypal Button Generator page.

I typed 1990 for Custom Capabilities on the Paypal Button Generator page when I made another button to access the 1990 Content page.

I typed 1994 for Custom Capabilities on the Paypal Button Generator page when I made another button to access the 1994 Content page.

I typed 1995 for Custom Capabilities on the Paypal Button Generator page when I made another button to access the 1995 Content page.

And I typed bundle for Custom Capabilities on the Paypal Button Generator page when I made another button to access the Bundle Package Content page, which ideally would give that user access to all the videos in one module (one video per page in that one module).

But during my test purchase, using the PayPal button I made to only access the "1993" Content page I was redirected back to my Products page. Every Content page link use to redirect me back to my Products page?!


So far I've only re-tested one of my test buttons and it works the right way. I need to run more tests, though, before I can let the site go live.


Thanks again for your help.
User avatar
ownit01776
Registered User
Registered User
 
Posts: 7
Joined: October 31, 2011

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby Cristián Lávaque » November 2nd, 2011, 11:52 pm

Thanks for reporting back. :)

Are you using a caching plugin?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby ownit01776 » November 3rd, 2011, 1:26 pm

Cristián Lávaque wrote:Thanks for reporting back. :)

Are you using a caching plugin?


I did install Quick-Cache yesterday after making my last post b/c my pages were taking a bit long to load.
User avatar
ownit01776
Registered User
Registered User
 
Posts: 7
Joined: October 31, 2011

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby Cristián Lávaque » November 4th, 2011, 12:14 am

Ah ok, that plugin is fine.

OK, about the 1993 ccap, did you make sure it's written exactly the same way in the button you use to sell it as when you enter it in the pages to restrict access? What do you see different with the other ccaps you sell and work?

About the bundle ccap, that's fine, but not if you use the meta box in the edit page to restrict access, because if you enter there bundle and the ccap for that specific page (e.g. bundle,1993) it'll require both ccaps to let the user, but he'll only have one or the other. In this case you'll have to instead use condiitonals, like:

Code: Select all
<?php if (current_user_can('access_s2member_ccap_bundle') || current_user_can('access_s2member_ccap_1993')) { ?>
Show the content.
<?php } else { ?>
Sell him the access.
<?php } ?>


I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby ownit01776 » November 4th, 2011, 5:31 am

Yup, that crossed my mind yesterday as I tested each button. Since I already have my pages set up in a such a way that gives users access to a single video at a time (Module -> Content page -> 1993 Video) or, if they buy the Bundle package, they'll get access to all my videos (Module -> Content page -> 1990, 1993, 1994, 1995 Videos) I figure I'll just have one ccap per Buy Now button/meta box in the edit page to restrict access. This seems to be working, even if the user who purchases the Bundle package is shown 2 places where they can see the same videos. I hope that won't be confusing to my customers though. :oops:

Membership Home page listing all of the module pages:
Clipboard01.jpg


Inside the Bundle Pack module page:
Clipboard02.jpg


Inside the 1993 content page:
Clipboard03.jpg
User avatar
ownit01776
Registered User
Registered User
 
Posts: 7
Joined: October 31, 2011

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby ownit01776 » November 4th, 2011, 5:48 am

Cristián Lávaque wrote:About the bundle ccap, that's fine, but not if you use the meta box in the edit page to restrict access, because if you enter there bundle and the ccap for that specific page (e.g. bundle,1993) it'll require both ccaps to let the user, but he'll only have one or the other. In this case you'll have to instead use condiitonals, like:

Code: Select all
<?php if (current_user_can('access_s2member_ccap_bundle') || current_user_can('access_s2member_ccap_1993')) { ?>
Show the content.
<?php } else { ?>
Sell him the access.
<?php } ?>


I hope that helps. :)


I've been watching the s2Member videos and re-reading the instructions on using Conditionals/API Scripting and so far I haven't used any PHP in my editors (although I have installed the PHP Execution plugin). I've been using the PHP shortcode substitutes, but I'm doing everything through trial & error.

Thanks, I'll paste in that code.
User avatar
ownit01776
Registered User
Registered User
 
Posts: 7
Joined: October 31, 2011

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby Cristián Lávaque » November 5th, 2011, 8:52 pm

I learn a lot through trial and error. :)

I see, so you have a page for those that buy the bundle, which has everything in it. That seems like a fine solution too. I thought you wanted to let them into the individual pages instead, in which case you can use the conditionals.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby ownit01776 » December 8th, 2011, 1:48 pm

I really appreciate the assistance with everything. And yes, I might use the conditionals as well, either to replace the Bundle page (b/c it may confuse the customers who've purchased the Bundle Package b/c they still won't be able to access the individual Show pages) or use them both on the website.

I needed a quick fix to in order to launch the site at that time, which is why I went with using the Bundle page containing links to all the Fashion Show pages. But now, I may go back and make the site more user friendly by using those conditionals only.

** I'm going to look through the forum to see if the code for creating the query string variable demonstrated here with an advanced query string variable that displays the name of the file the customer tried to access and tells them they need to upgrade their membership level in order to access it. And provides that specific Buy Now button so they won't have to go back to the main Products page to look for it.

(he demonstrates it at 06:00 in the video)
http://youtu.be/FDsFkjxA-MQ?hd=1


** And since I have all of my media files (videos of the Shows I'm selling) stored in my Amazon S3/CloudFront account I need to find where it's explained how to provide a download link to those files while keeping them protected from unauthorized access.


Thanks again for such great help!!
User avatar
ownit01776
Registered User
Registered User
 
Posts: 7
Joined: October 31, 2011

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby Cristián Lávaque » December 10th, 2011, 3:45 am

No problem!

About using s2Member to protect files hosted in Amazon, you can find the documentation in the Download Options page. They were added after the video about download restrictions was created. WP Admin -> s2Member -> Download Options -> Amazon S3/CDN Storage & Delivery and Amazon S3/CloudFront CDN Storage & Delivery

There were other things added to the download options, so I suggest you browse that whole page.

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: CCap: Paying Customers Unable to Access Pages They Paid

Postby ownit01776 » December 11th, 2011, 12:20 pm

Cool....thanks! I will check it out right now.
User avatar
ownit01776
Registered User
Registered User
 
Posts: 7
Joined: October 31, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

cron