One option of the Open LMS eCommerce solution is the ability to require a subscription to access the site. This is useful if you want to sell access to the site itself and prevent login by users without a valid subscription.
If you're going to use this feature take care as out of the box only the site admin is able to login without a subscription. To enable this option go to Site Administration > Commerce > Subscription settings and enable the option "Require subscription."
Once this option is enabled users that don't have a valid subscription will not be able to access the site. If there are users or roles that you want to be able to use the site without a subscription you must make sure they have a special permission set:
local/sitesubscription:ignore
You can create the "Site subscription" product prior to enabling the option that limits access to subscribers.
Go to Site Administration > General > Create product. Give your new product a name, such as Site access subscription. You can provide a description and then from the "Benefits" list choose "Site subscription." Click, "Save changes" to enable the pricing options. Once you've done that you'll be able to set the different prices for different lengths of time.
Now that you've saved the item you can click the gear icon and then click on "Create price" (at the bottom of the page) to set prices.
Each price can have it's own description. This is useful to explain differences between different pricing options. You can also set restrictions on some prices to enable users that match specific criteria to get access to limited pricing, such as profile field values or cohort membership.
The above screenshot shows a price of 50 USD for a monthly recurring subscription. You can create multiple prices for the same product with different terms, such as a slightly higher price for a non-recurring one month subscription ("one off subscription" in the pricing settings). You can also create perpetual licenses that grant access that is not time limited. The screenshot below shows the same product with a range of models with variable pricing. None of the prices are limited or restricted, but are available based on user selection.
Once you've set up the products and permissions to your liking you can go to the subscription settings (Site administration > General > Commerce > Subscription settings) and enable the "Require subscription" option. Once that option is enabled only users that have a valid subscription or the required bypass permission will be able to login to the site.