Membership products are one of many virtual products that you can sell in your Hotcakes Commerce store. Membership products allow you to automate the process of selling access to areas in your website for whatever price you want. Excellent examples of this include access to members-only content, software/file download areas, community areas, partner portals, and more.
The following pre-requisites will be necessary to accomplish the goals of this article:
- Basic understanding of products
- Store administrator access
Adding a membership product is done nearly the same way as any other product in your store catalog. The process is amazingly simple and the differences are outlined in the instructions below.
CREATING A MEMBERSHIP PRODUCT
Before you create any membership products, you will need to first create a membership product type. You'll find Membership Product Types in the Catalog menu as shown below.
When you first arrive at this page, there will not be any membership product types, as you would expect. So we will need to create one by clicking the Add Membership Type button.
This will open a pop-up that prompts you to enter the details of what this membership product type grants access to and for how long.
|Name||This is a value that the merchant and customer will see. You should enter a title of the membership product type appropriately. This value also will be localized if you edit the membership product type in another language.|
|Membership Role||The list of roles/groups shown here are populated from the CMS. If you don't see a role here that you want to use, you should first create it in the Admin > Security Roles page in the CMS. The role selected here will be assigned to the customer upon a successful purchase.|
|Expiration Period (text box)||You should enter a numeric value here that works with the drop down list to define how many units of the chosen interval will be assigned to the customer.|
|Expiration Period (drop down list)||Select the interval of the expiration period. Your choices include Days, Months, and Years. The selected value will work with the previously mentioned text box to define the period of time the role is assigned to the customer.|
Now that we saved the membership product type, you'll see it in the list. Repeat this process as desired.
Please note that if you set the expiration period for 1 year or 365 days and the customer purchases this membership product again, the expiration period will be extended to reflect the additional time. For example, if you were to purchase the 1 year annual subscription in the image above, you would initially be added to the defined role for 1 year. If you purchase this same product again in 11 months, you will then be re-assigned to the role for 13 months - reflecting the 1 remaining month, plus the 12 months in the newly purchased year.
Now we will need to create the product so that the membership can be sold. Navigate to the Products view in the Catalog menu.
Choose to create a new product below the left sidebar menu,
You will now create the product like you would with any other product, to include pricing, images, etc. However, you'll now have a new option in the Product Type drop down list for the membership product type you just created.
It is highly suggested that you also mark this product as non-shipping so that it doesn't require the shipping address form fields to be filled out during checkout.
Once you save this new product, you'll see it listed in your product catalog.
Your customers will now also be able to see the membership product and purchase it.
The product details page for this new membership product will initially be displayed like any other product in your store, so you might want to create a custom view in your viewset to display it differently as desired.