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.

Limit download access based on quantity.

Home Forums Community Forum Limit download access based on quantity.

This topic contains 0 replies, has 1 voice. Last updated by  Dem Strat 4 years, 6 months ago.

Topic Author Topic
Posted: Monday Jun 18th, 2012 at 6:40 pm #16796
Dem Strat
Username: panther

Hi,

I’m using S2member plugin to control my users’ access of my restricted file (it’s an online course).

The online course (swf file) is restricted inside the S2member’s default restricted folder and it works fine.

It loads automatically on the browser (instead of being downloaded).

My online store page is also working fine. There is a quantity field in my “buy now” paypal form.

What I need to do is this:

If someone buys 10 (Qty=10) they are restricted to access the specific page (where the swf file is loaded from) to 10 times. In other words login access (or download access) based on quantity. So if they tried to access the course for 11th time, they will be denied.

Can I do that by adding some php code in my page where the swf is called?

I came across this code of x-logins by “Philly”:

<?php if(S2MEMBER_CURRENT_USER_LOGIN_COUNTER 
    Show download link to customers that have logged in 5 times or less

Can this be ajusted to achieve what I want?

In my paypal form the quantity field’s value is “quantity” if it helps anyone writing the code.

I’m guessing that I can do this with conditional or custom capabilites but I’m not sure how.

Is it possible? could anyone suggest the code for it?

Thank you in advance,

Dem

  • This topic was modified 4 years, 6 months ago by  Dem Strat.
  • This topic was modified 4 years, 6 months ago by  Dem Strat.
  • This topic was modified 4 years, 6 months ago by  Dem Strat.
  • This topic was modified 3 years, 4 months ago by  Dem Strat.

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.