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.

Buy Now Buttons 4 Custom Expiring File Links

Home Forums Community Forum Buy Now Buttons 4 Custom Expiring File Links

This topic contains 3 replies, has 3 voices. Last updated by  Jesse Ali 4 years, 6 months ago.

Topic Author Topic
Posted: Monday May 14th, 2012 at 3:34 am #13375

It is mention in the following closed post that it is possible to make a button that will charged someone for a download of a pdf file after paying for it ala carte… although the link is on a page that the member does have access to… So I have a post of a video and i want to create paypal button to charge for download and then to take customer to download link that is unique to them and expiring. Not clear how to accomplish after watching your great videos.

in Summary:
Please tell me how to create the button for the link that requires 1. paying buy now amount 2. and then also finishing the delivering the product on a secure link.

thanks

http://www.s2member.com/forums/topic/specific-page-buy-now-buttons/

Another method you could use is to not protect the pages with specific post page access restrictions, but to protect the links to download the theme.

Which you can do under Dashboard -› s2Member® -› Download Options -› Basic Download Restrictions and Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions.

Again, simply put the buy now buttons in the page/post with the download link, or in your membership options page.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday May 15th, 2012 at 6:31 am #13494

Hi Arthur.

What you can do is create a page which you’ll protect with a Specific Post/Page Access Restriction. [hilite path]Dashboard -› s2Member® -› Restriction Options -› Specific Post/Page Access Restrictions[/hilite]

This video explains that restriction well (the interface may have changed a bit since the video):

In the page you restrict and sell independently, you can place the protected file you’re selling, and use a download key so it can be downloaded by the person although he doesn’t have an s2Member Level. [hilite path]Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions[/hilite]

I hope that helps. :)

Posted: Monday May 21st, 2012 at 6:14 pm #14107

Cristian thank you for your help. I watched the 2 videos on protecting and selling pages or posts. But I am still confused about how to set up a key for download link or whatever i would want a paid customer to click to be delivered a download for a pdf . … please tell me where i can find out more on how to use this function…

Posted: Sunday Jun 17th, 2012 at 12:04 pm #16729
Jesse Ali
Username: JesseAli

Same problem. I have found the download key area just fine… Support points to that area over and over in these forums. I know WHERE the advanced download restrictions are… but it sure would be nice for a better explanation of HOW to use them… because so far, the only thing I can get any of the short codes to produce is non clickable link… it works if I copy and paste the long link with the key into the address bar… but it is not clickable :(

I also would like to be able to make the link say something different or even put it inside of a picture… but none of this is discussed… and in the end… I would just like the link to work…. Please do not send me to the download restrictions area… been there… need help there…

I see all this (it just does not work):

By default, s2Member uses your Basic Download Restrictions, as configured above. However, you can force s2Member to allow File Downloads, using an extra query string parameter: &s2member_file_download_key=[Key]. A File Download `Key` is passed through this parameter; it tells s2Member to allow the download of this particular file, regardless of Membership Level; and WITHOUT checking any Basic Restrictions, that you may or may not have configured above. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you’ll need to install this handy plugin ( PHP Execution ). There is also a Shortcode equivalent, which does NOT require PHP at all, as seen below.

http://??????????????/?s2member_file_download=example-file.zip&s2member_file_download_key=
s2member_file_download_key =

http://###########/?s2member_file_download=example-file.zip&s2member_file_download_key=s2Key file_download="example-file.zip" /]
Shortcode equivalent: [s2Key file_download="example-file.zip" /]

[s2File download="example-file.zip" download_key="true" /] ( Key is auto-generated in this case )
Shortcode equivalent: [s2File /] produces the entire URL, no need to generate a Key yourself.

The function s2member_file_download_key(), is part of the s2Member API. It produces a time-sensitive File Download Key that is unique to each and every visitor. Each Key it produces ( at the time it is produced ), will be valid for the current day, and only for a specific IP address and User-Agent string; as detected by s2Member. This makes it possible for you to create links on your site, which provide access to protected file downloads; and without having to worry about one visitor sharing their link with another. So let’s take a quick look at what s2member_file_download_key() actually produces.

s2member_file_download_key(“example-file.zip”) = a site-specific hash of: date(“Y-m-d”).$_SERVER[“REMOTE_ADDR”].$_SERVER[“HTTP_USER_AGENT”].$file

When s2member_file_download_key = a valid Key, it works independently from Member Level Access. That is, a visitor does NOT have to be logged in to receive access; they just need a valid Key. Using this advanced technique, you could extend s2Member’s file protection routines, or even combine them with Specific Post/Page Access, and more. The possibilities are limitless really.

Viewing 3 replies - 1 through 3 (of 3 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.