For a yoga instructor's website, I have set up 4 subscription products (virtual) in BC. Besides access, for the subscription period, to the instructor's library of video lessons, each subscription allows the member a fixed number of free live lessons, effectively:
To be clear, on the face of it, it may appear that the above translates to 1 lesson per month, but we actually want the member to be able to use up their allocated free lessons as quickly as they desire.
Therefore, I want to create a booking form in BF which will limit the number of submissions based on detecting the membership duration in BC.
I realise I could simply create four different forms, each conditionally visible to a specific user group, and, as shown in the BF documentation, limit the number of submissions per user per form.
However, that logic will be a problem, as the submission limit will not reset if the subscriber renews their subscription and remains in their user group, so I need a script that detects the actual current subscription status of the user and limits the submissions based on that.
OR, perhaps there is a way to modify the file downloads section of the virtual product to allow access to a form, rather than a file?
what we are doing here at crosstec is having a product for each membership.
And in each product => Parameters Advanced, we setup a duration in days and the group that the user should be included with for as long as the duration lasts.
This is observed by the system plugin "plg_system_breezingcommerce".
And there you have your script
You could make a copy of this system plugin and match it exactly your case. There is a lot going on there, but it should be possible to limit it to your said memberships, including setup.