
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.

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.

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.

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.

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.

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.

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.

3. Automating the assignment of users to courses
With ECA, we define the following process:
- Event: order reaches "Completed" status.
- Condition: we check that the order includes the course.
- Action: we add the user to the appropriate course group.

After setting up and configuring the above modules, our store is ready to sell online courses.
Example of online course purchase and user assignment
- The user adds the course to the shopping cart and makes payment.
- The system automatically assigns it to the corresponding course in the LMS.
- The user can start the course and pursue the next steps.
- The administrator can monitor the student's progress and evaluate his performance.

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.