Skip to Content Skip to Menu

With CB Subs is possible to sell a specified number of items?

  • lucablue
  • lucablue
  • OFFLINE
  • Posts: 226
  • Thanks: 16
  • Karma: 1
2 years 10 months ago #327811 by lucablue
Hi,
I'm using CB Subs in one website with its normal function of selling subscription by time (ex. 1 year of subscription).

I neet to know if is it possible, and how, to give the possibility to users to buy a certain number of access in specific article (Ex. package with 5 access) instead by time.

Thank you

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 10 months ago - 2 years 10 months ago #327816 by krileon
5 total or 5 per user or do you mean they buy 5 accesses to the article that tick down per access? If per user you can use "Total number of occurrences of regular validity/price (0=unlimitted)" under the Pricing tab to limit renewals. 5 total is a bit trickier. If you mean 5 times accessing the article that's even more tricky as that functionality just doesn't exist so it has to be developed, but is doable.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 2 years 10 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • lucablue
  • lucablue
  • OFFLINE
  • Posts: 226
  • Thanks: 16
  • Karma: 1
2 years 10 months ago #327817 by lucablue
Sorry for confusion.

I mean: I publish 5 different articles. Each user can buy the package to see all 5, after the 5th time he need to buy a new subs.

Every article can be seen just 1 time.

Is it more clear?
Thank you

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 10 months ago #327819 by krileon
We don't have any functionality for that. Our subscriptions are all time based. The only way to do that is create a database that keeps track of a users view access to each and every article. So something like the below structure.

user_id | article_id | date

Next you'd need to insert into that database when they view the article. This can be done using CB Auto Actions on Joomlas onContentAfterDisplay event, which will need to be conditioned to be sure it's even an article being viewed (use var1 for that which is "context", which should be "com_content.article"). This should just be a Query action type.

Next you'd need an auto action that blocks access if they've already viewed the article. You can do that using Joomlas onContentBeforeDisplay event. Same situation where you need to condition the context AND now you also need to condition that database (CB Auto Actions supports Query conditions so not a problem). Suggest just using a Redirect action type and redirecting them away.

Now that gives you 1 time viewing access to articles. This is independent of CBSubs though. For CBSubs part in this I suggest just protecting those specific articles with a subscription and that covers the buying access part. If you need them to buy views instead then use a Merchandise plan and a CBSubs SQL Actions usage to clear that database table of their article views otherwise you'll have to figure out a system to also keep track of how many article views they're allowed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • lucablue
  • lucablue
  • OFFLINE
  • Posts: 226
  • Thanks: 16
  • Karma: 1
2 years 10 months ago #327826 by lucablue
Ok, thank you for answer.

I'm thinking to do it in another way, let me know if is it possible and how:

1) Normally I know that the subs are in a tree forms (Ex. I can subscribe to A, or B or C. If I want, as developer, I can give the possibility to user to get A and B feature if he subscribes to C). Is it possible, instead to have different subs profiles not dependent from each other and give the possibility to user to subscribe to A and C (but not B) or only C (and not have the benefit of A and B)? (I hope it is quite clear :P)

2) I can sell to users some CODE VOUCERS, ex. user can buy a package with 5 code vouchers. Is there a module or plug in which permits to user to insert one of the code and the system invalid it for eventual new try to insert the SAME code meanwhile send to a specific email warning that user has just used that code and so he can get a specified service?

Thank you for help

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 10 months ago #327848 by krileon

1) Normally I know that the subs are in a tree forms (Ex. I can subscribe to A, or B or C. If I want, as developer, I can give the possibility to user to get A and B feature if he subscribes to C). Is it possible, instead to have different subs profiles not dependent from each other and give the possibility to user to subscribe to A and C (but not B) or only C (and not have the benefit of A and B)? (I hope it is quite clear :P)

Yes, just set all 3 plans to non-exclusive then they can combine them however they like and you can use conditions to limit those combinations (e.g. B hides if C is selected).

2) I can sell to users some CODE VOUCERS, ex. user can buy a package with 5 code vouchers. Is there a module or plug in which permits to user to insert one of the code and the system invalid it for eventual new try to insert the SAME code meanwhile send to a specific email warning that user has just used that code and so he can get a specified service?

Using CBSubs Family Plans to share a subscription might be easier. Alternatively yes you could dynamically generate coupons for them to give out. The CB Paid Subscriptions action type in CB Auto Action has a Promotion mode which is used to create coupons dynamically using an auto action. You could display their available coupon codes on profile to them using CB Query Field to query the promotions table, but it's all not as a clean as just letting them share their subscription X number of times.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum