local_retained:shop:structure:classes:product

The Product class :Concept of product instance

Moodle Integrated Shop : Structural elements

Introduction

When a purchase is made on the platform, certain products are constructed by creating data, rights, or Moodle “business objects”. This data can present a certain life cycle on which the customer can act.

The product instance record is data used to bind the data put in place in Moodle as a consequence of purchase with purchase identification (as well as its parameters). It contains additional data for managing the life cycle (as defined by the sales policy chosen for the product).

Exemple : A single enrolment in a course

Let’s take the simple case of a buyer/learner who purchases an enrolment in a course on office information systems for their own personal benefit. The course can be accessed for a maximum period of 4 months.

A product instance will be created on behalf of the user, referencing:

  • The billing item that generated its creation
  • The catalogue entry giving the type of product
  • The last billing item concerning this product (in case of renewal for example)
  • The user enrolment instance in the mdl_user_enrolments table representing their enrolment
  • A customer account reference
  • An image of production data when the product is implemented

End of life for a product instance

local_retained/shop/structure/classes/product.txt · Last modified: 2024/05/14 15:38 (external edit)