Username Password
Bookmark and Share


Subscriptions are a great way to offer products or services on your site that otherwise would be unavailable to the average user. Often, subscriptions are used to provide access to online support services that need to be purchased on a cyclical basis, for example every year.


A Subscription asset could be used to provide access to special material on your site. You might run an online magazine service. The content for the magazine would be made viewable to only users who have subscribed to the magazine. The Subscription asset is how those users would purchase a subscription.


Another example is a digital download service. Perhaps you want to sell music, movies, software or other media through your site, and you want to allow users to download the media from a special area. Selling a subscription to these items allows the user to access the items and come back to the site any time during the subscription term to download more items. In a case such as software downloads, the user might also have access to the latest versions as they are released.


Setting up a subscription is a combination of Shop and Group set-up.


Create a Subscription Group

You will first need to establish a group subscribers will become members of upon purchasing a subscription. This is done through Groups in the Admin Console.


In the Admin Console, click on Groups to open the Groups screen. Upon entering the Groups screen you will see all the existing groups listed that are available to manage.



In the Groups screen, click the “Add a new group” link on the far right hand side of the screen to open the Edit Group screen.


In the Edit Group screen, enter the necessary information regarding this group. This can be as simple as a name and description, or more involved depending on your needs.



  • Group Name: a name or title for this group.

  • Description: a description of the what this group is for.

  • Is Editable?: if set to No, you will not be able to edit this group again after its creation, and it will not appear in the list of manageable groups.

  • Show in Forms?: should this group show up in fields where you can select groups for the purposes of assigning privileges. For example, in an asset's Security tab for the who can edit or view fields.

  • Expire Offset: the amount of time that can pass before the group access expires. If this is a group that you want to remain active for a very long time set this to a large number.

  • Notify user about expiration?: set this field to Yes if you want WebGUI to notify users when they are about to be expired from this group.

  • Expire Notification Offset: determines how much advance notice a group member will receive before group membership expires.

  • Expire Notification Message: enter a message the user will receive via email upon group expiration.

  • Delete Offset: the number of days that will pass between expiration notification and the group's actual deletion from the system.

  • IP Address: if this is specified, any users visiting the site from that IP range will automatically be a member of this group. This is great for intranets where you want to grant access to some information, but only if the users are inside your network.



  • Scratch Filter: users can be dynamically bound to a group by a scratch variable in their sessions.

  • Users can add/remove themselves?: set if users can add or remove themselves from a group. For example, if a user clicks on a Subscribe link in a forum, the user is electing to add him/herself to that group.

  • Database Link: if you'd like to have this group validate users using an external database, select the database to use.

  • SQL Query: to validate users against an external database you may construct an SQL statement that will return a list of WebGUI userids for users in the group.

  • The LDAP fields can be used to bind users in a group to an existing LDAP directory.

  • Cache groups for how long?: large sites using external group data will make many calls to the external database. To help reduce the load, you may select how long you'd like to cache the results of the external database query within the WebGUI database.


When the group is configured as you wish, click save to create the group. You will be returned to the Groups screen. From there, click the Back to Site link on the far right hand side of the screen to return to the site.


Create a Subscription

Subscription creation is done through the Subscription asset, located in the New Content menu.


  1. Navigate to the location on the site where you would like to add the Subscription.

  2. Click on Subscription in the New Content menu to open the “Add/Edit Subscription” screen.



  1. In the “Title” field, enter a title for this asset.

  2. The “Menu Title” is the title of this asset as it appears in the site navigation. You can enter one yourself, or you can leave it blank and WebGUI will use the title entered in the “Title” field here.

  3. The “URL” is the URL for this asset. You can create one, or leave this field blank and WebGUI will create one for you.

  4. In the “Description” field you can enter text related to this subscription service. This could be instructions, explanation of the services provided by this subscription, contact information, or any important information you want the user to know.

  5. The “Thank You Message” is the message users will see upon adding this Subscription to their shopping carts.



  1. The “Subscribe to group” is the group which the user will become a member of upon purchasing this subscription. In the example above, you can see that the Subscription Group created at the beginning of this chapter was selected. Use the dropdown menu to select a group from your system. Make sure that the “Who can view?” field in the Security tab of any asset related to this subscription corresponds to the “Subscribe to group” field in the Properties tab of this Subscription asset.

  2. The “Subscription period” is the length of a single subscription term. So, how much time will pass before users must pay to renew their subscriptions? If a subscription is non-renewing (meaning the subscriber doesn't get billed on a recurring basis), then purchasing two subscriptions will cause the length of the subscription to double. Likewise, the length of the subscription will be extended if a subscriber returns and purchases a new subscription before the current subscription expires.

  3. The “Execute on subscription” field is an area in which a Perl script can be entered. This script will be executed when the user has subscribed and paid. This can be used if WebGUI is being used for registration of an external system, in which case WebGUI is only the commerce system. For example, you may be selling “support” on the site, but actually conducting that through an external trouble ticketing system. You will need to give privileges to the external system, so a Perl script is run to do that. It can also be used to set up notifications to staff or trigger processes on other servers, such as a shipping system to send out merchandise associated with this subscription.

  4. Set display settings in the Display tab.


    1. If “Hide from navigation?” is set to Yes, the menu title of this asset will be hidden from the site's navigation.

    2. If “Open in new window?” is set to Yes, this asset will open in a new browser window when viewed directly.

    3. If “Display Title?” is set to No, the asset's title will not appear on the page.

    4. The “Subscription Template” is the template applied to this Subscription asset. If you have a custom Subscription template, you select it here.

    5. The “Redeem Subscription template” is the template used to display the screen in which users redeem subscription codes.

12. In the Security tab you can select the group of users who can view this asset on the site. For example, if this subscription is only available to registered users, you could select that group for the “Who can view?” field. The “Who can Edit?” field is the group of users allowed to edit this specific asset. The Owner of the asset always has both editing and viewing rights.

13. The Metadata tab contains the standard metadata fields common amongst most assets. If you want to assign metadata to this subscription asset, do so here.

14. The Shop tab contains some commerce-related fields.


    1. The SKU is the stock keeping unit for this Subscription asset. You can create a SKU of your own, or let WebGUI generate a random SKU for you.

    2. The “Vendor” field allows you to select a vendor who should get credit for this item. This is optional.

    3. If “Ships Separately?” is set to Yes, this item will accrue shipping costs separate from other items in the cart. Since a subscription is not a physical item, you can probably leave this field set to No.

    4. The “Override tax rate?” field allows you to override the default tax rate for this item.

    5. If you are overriding the tax rate, enter the new tax percentage to be applied to this item in the “Tax Rate Override” field.

15. Click save to place the Subscription asset on the site.



Above is the Subscription asset as seen in Admin mode. While in Admin mode, users with the appropriate privileges will see a number of links for creating and managing subscription codes. Normal site visitors will not see the black bar containing the additional links. Users purchasing this subscription click on the “Add to cart” button, and proceed to their carts to complete the purchase. You can learn more about the shopping cart in the chapter devoted to that subject.



Subscription Codes

It is possible for users to access subscription content without actually going through the purchase process. This is done by providing the user a subscription code. For example, an organization may purchase a subscription service for an entire department within that organization. Instead of purchasing a separate subscription for each person, a single purchase can be made, and you, or whoever manages the Subscription asset on your site, can generate a batch of subscription codes to provide the organization. The organization can then distribute the subscription codes, and each user within the organization can then redeem that code on your site to access the subscription.


In order to provide a user with a subscription code, you must generate a batch of subscription codes. While in Admin mode, a black bar containing a number of links will appear at the top of the Subscription asset.



Click on the “Generate a batch of subscription codes” link. This will open the Create a Batch of Subscription Codes screen.



  1. In the “Number of codes in batch” field enter the number of subscription codes you need to generate. Once a code is redeemed it will become inactive, so codes can not be shared.

  2. The “Subscription code length” field allows you to determine how many characters each code should contain. The default value is 64, and the minimum number of characters allowed is 10.

  3. The “Codes expire after” field allows you to set an expiration for the subscription codes. So, if codes are not redeemed by the end of one month, they will no longer work. You can alter the length of time to fit your needs.

  4. The “Batch Name” field is where you enter a name to assign to this batch of subscription codes.

  5. The “Batch description” field is a place where you can enter notes about why this batch is being created.

  6. Click save to generate the subscription codes. You will be directed to the Manage Subscription Code Batches screen.


Manage Subscription Code Batches

The Manage Subscription Code Batches screen allows you manage the code batches that currently exist on your site. This screen is where you will be directed upon creating a batch of subscription codes, and can also be accessed through the links available while viewing the Subscription asset while in Admin mode. A Subscription Code Batch will appear in the screen until all codes in a given batch are redeemed, expired, or manually deleted by you.



The screen displays the Batch Name and description of each subscription code batch, along with a red X by which to delete a batch. The “List the codes in this batch” link will direct you to the Manage Subscription Codes screen, where you can retrieve the codes.


Manage Subscription Codes

This screen can be accessed via the links that appear when viewing the Subscription asset in Admin mode or by clicking on “List the codes in this batch” in the Manage Subscription Code Batches screen.



At the top of the screen are some search fields by which to locate batch of subscription codes. You may limit the results on this screen by searching for a group of codes within a range of usage dates or creation dates, or you can select the batch of codes to display by selecting a specific batch's description from the dropdown menu. The codes displayed on the screen will reflect what you input into the search fields at the top of the screen. You can see the status of each individual code, used, unused, or expired on the far right hand side of the screen. To delete all subscription codes currently viewed on the screen, use the “Delete all of these codes.” link above the list of codes on the screen.


Redeem Subscription Code

Once a batch of subscription codes has been generated, a link will appear within the Subscription asset the codes correspond to.



Users click on the “Redeem a subscription code.” link to be directed to the screen in which their codes can be redeemed.



Users simply enter the subscription code into the “Code” field, click save, and they will be granted access to the site content related to this subscription. A confirmation message will be displayed upon saving.


Keywords: group SKU subscribe subscription code subscriptions user

Search | Most Popular | Recent Changes | Wiki Home
© 2023 Plain Black Corporation | All Rights Reserved