Documentation Home

Subscription Product Tutorial

Single billing period

Creating a "Subscription product" can be done in one step, via the Product page, if the product will have only one type of billing period (e.g. MONTHLY, QUARTERLY, etc).

Appropriate options are presented, in order to mark whether or not the product "is a subscription product", and, if so, which is its billing period.

Subscription

Adequate server-side validation prevents you from combining wrong choices (e.g., marking a product as "being subscription" but omitting to choose a billing frequency).

Multiple billing periods

If the subscription product will have multiple possible billing periods, then those periods will have to be added as product options, and essentially every combination of base product + billing frequency option will constitute a separate SKU.

In order to set up a Subscription Product this way, you will have to perform the following steps.

Step 1: You'll need to create the product option type:

You can create the Product Option Type manually in the Broadleaf admin or by running the following SQL for preset types.

INSERT INTO BLC_PRODUCT_OPTION (PRODUCT_OPTION_ID, OPTION_TYPE, ATTRIBUTE_NAME, LABEL, REQUIRED) VALUES (-26000, 'SELECT', 'BILLING_FREQUENCY', 'Billing Frequency', TRUE);
INSERT INTO BLC_PRODUCT_OPTION_VALUE (PRODUCT_OPTION_VALUE_ID, ATTRIBUTE_VALUE, DISPLAY_ORDER, PRODUCT_OPTION_ID) VALUES (-26001, 'MONTHLY', 2, -26000);
INSERT INTO BLC_PRODUCT_OPTION_VALUE (PRODUCT_OPTION_VALUE_ID, ATTRIBUTE_VALUE, DISPLAY_ORDER, PRODUCT_OPTION_ID) VALUES (-26002, 'YEARLY', 3, -26000);

The resulting product option screen will look like this ...

Subscription

Step 2: In the admin, create a new product and select the "Is Subscription" option

Step 3: Next, you'll add the product option to one or more of your products

The screen shot below shows the results of navigating to the "Product Options" tab for a product and adding the type
created in step 1.

Subscription

Step 4: Generate SKUs

Once the product option has been added to the product, use the "Generate SKU's button to create individual SKUs for each
option type. This produces the following result.

Subscription