-

How to Sell Courses Online? Set Up a Functional Store on Drupal

Many online course creators wonder how to effectively manage sales and automatically grant access to educational content. With Drupal and the available modules, we can build a fully functional online store that handles payments and automatically assigns users to purchased courses. We encourage you to read the article or watch an episode of “Nowoczesny Drupal” series (the video is in Polish).

User stories to create an online course store

To begin with, we’ll define sample scenarios of users we want to serve in the online course store:

  • A non-logged-in user should be able to browse the online course offerings they’re interested in, add the course to their shopping cart, complete the payment process, and once the purchase is finalized, access the course to start learning immediately.
  • The online store administrator should be able to create courses, add lessons, manage course content, and assign individual user access - both automatically and manually.

Drupal modules needed to sell online courses

The whole process of configuring an online store is based on using ready-made Drupal modules. Thanks to them, we can avoid the need to write our own code. Below are the needed modules.

1. Drupal Commerce

Drupal Commerce is a comprehensive e-commerce module for Drupal that enables:

  • management of products and their variants,
  • handling shopping carts and orders,
  • configuration of taxes and payment methods,
  • defining the workflow of the purchasing process.
A presentation describing the Drupal Commerce module for creating an online course store.

 

2 Commerce T-Pay

The Commerce T-Pay module integrates Drupal Commerce with the Polish payment gateway T-Pay, enabling fast and convenient online payment methods.

A presentation describing the Commerce T-Pay module that allows you to set up online payments in your store.

 

3. Group

The Group module allows you to organize users into groups and manage access to content. It’s a key system component that enables you to assign courses to specific users.

An excerpt from the Nowoczesny Drupal episode about the Group module for organizing users.

 

4. LMS (Learning Management System)

Learning Management System (LMS) is a developing module, which is a fork of Drupal distribution's Opigno LMS, that allows us to configure and manage courses. With it, we can:

  • create lessons and organize their structure,
  • add tests and activities for learners,
  • monitor the progress of users.
A presentation describing an LMS module for Drupal to manage learning in selling online courses.

 

5. Event Condition Action (ECA)

Event Condition Action (ECA) is a powerful process automation engine in Drupal. It enables us to define events and conditions that we want the system to react to and perform specific actions. In our case, it’ll allow us to automatically assign a user to a course after the order is paid.

Description of the ECA module, which enables the creation of complex processes for selling online courses.

 

Set up a store to sell online courses

After installing the above modules, we need to configure them accordingly.

1. Configuring Drupal Commerce

After installing the Commerce module, we:

  • add a new currency (e.g., PLN),
  • create a store and products - in this case, online courses,
  • configure product variants, adding references to courses in the LMS.
Screen from Drupal settings with the "product variation types" for online course sales configuration.

 

2. Creating courses in the LMS

The LMS module allows us to define various entities:

  • Types of activities - e.g., test questions, videos,
  • Lessons - organization of educational content,
  • Courses - containing a set of lessons and a group of users.
Screenshot of the configuration of the LMS module for setting up online course sales in Drupal.

 

3. Automating the assignment of users to courses

With ECA, we define the following process:

  1. Event: order reaches "Completed" status.
  2. Condition: we check that the order includes the course.
  3. Action: we add the user to the appropriate course group.
Screenshot of setting up an action flow when buying an online course in a Drupal store. 

 

After setting up and configuring the above modules, our store is ready to sell online courses.

Example of online course purchase and user assignment

  1. The user adds the course to the shopping cart and makes payment.
  2. The system automatically assigns it to the corresponding course in the LMS.
  3. The user can start the course and pursue the next steps.
  4. The administrator can monitor the student's progress and evaluate his performance.
Example of how to purchase an online course and assign a user to the purchased training on Drupal.

 

Selling online courses in Drupal - summary

With Drupal Commerce, Group LMS, ECA, and Commerce T-Pay payment modules, we can fully automate online course sales. Drupal gives us the ability to easily scale and customize our system.

If you have questions about implementing a store on Drupal or want to learn more about ECA's capabilities, contact the experienced Drupal Commerce specialists. We’ll be happy to help you with your project.

Drupal-Commerce-Services-Banner-Blog-Droptica