Added Entities
This module provides a deep integration between Drupal and the Eduframe API. It synchronizes educational data into custom Drupal Content Entities and Taxonomy terms, allowing developers to leverage native Drupal features for Eduframe data without having to build the entire data synchronization themselves.
Architecture
The module adds four Content Entities and two Taxonomy types. Data lifecycle is managed via a centralized Mapper service and Webhook listeners.
Data Visibility & Publishing
The synchronization of Categories, Catalog Products, and Catalog Variants is dependent on their publication status within Eduframe.
- Automatic Filtering: The module automatically identifies which objects are marked as "Published" in Eduframe and only synchronizes those resources.
- Visibility Settings: If a resource is not appearing in Drupal, ensure that its visibility settings in Eduframe are configured correctly for the website or signup form.
For more detailed information on how these settings work within the Eduframe platform, refer to: Visibility of products and categories on the website and signup form.
Content Entity Reference
Catalog Product (eduframe_catalog_product)
The top-level entity representing a course or educational product.
| Field Name | Type | Description |
|---|---|---|
| label | String | The name of the product (name). |
| slug | String | URL-friendly identifier (slug). |
| category | Entity Reference | Points to eduframe_category (category_id). |
| labels | Entity Reference | Multi-value reference to labels taxonomy (label_ids). |
| cost | Decimal | The numerical price of the product (cost). |
| currency | String | ISO currency code, e.g., USD/EUR (currency). |
| cost_scheme | String | The pricing model applied to the product (cost_scheme). |
| signup_url | String | External link to the Eduframe checkout (signup_url). |
| avatar | Media Reference | Reference to a Drupal Media entity (Source: avatar). |
| course_tab_contents | String (Long) | Serialized JSON containing tabbed course details (course_tab_contents). |
| position | Integer | Sorting weight for catalog display (position). |
| productable_type | String | The underlying Eduframe resource type (productable_type). |
| custom | String (Long) | Custom fields/metadata stored in JSON format (custom). |
Custom fields are JSON objects that contain key value pairs where the key is the unique identifier of the custom field as configured in Eduframe. Any newly configured custom fields automatically are added to the custom attribute in the module.
The course tab contents contain the HTML compatible text that editors can enter in Eduframe. Each entity in the list contains both an attribute content and course_tab.name.
Catalog Variant (eduframe_catalog_variant)
Specific offerings or instances of a product.
| Field Name | Type | Description |
|---|---|---|
| label | String | The name of the variant (name). |
| catalog_product | Entity Reference | Parent eduframe_catalog_product (product_id). |
| course_location | Entity Reference | Points to eduframe_course_location (properties.course_location_id). |
| course_variant | Entity Reference | Points to course_variants taxonomy (properties.course_variant_id). |
| sku | String | Stock Keeping Unit identifier (sku). |
| availability | String | Status string, e.g., "available", "full" (availability). |
| available_places | Integer | Current remaining capacity (available_places). |
| cost | Decimal | The numerical price of this specific variant (cost). |
| currency | String | ISO currency code (currency). |
| cost_scheme | String | The pricing model applied to the variant (cost_scheme). |
| start_date | DateTime | The specific start schedule for this variant (properties.start_date). |
| end_date | DateTime | The specific end schedule for this variant (properties.end_date). |
| type | String | The variant property type, e.g., "planned" (properties.type). |
| custom | String (Long) | Custom fields/metadata stored in JSON format (custom). |
Category (eduframe_category)
Hierarchical organizational units for the catalog.
| Field Name | Type | Description |
|---|---|---|
| parent_id | String | The Eduframe ID of the parent category. |
| description | Text (Long) | Processed text field using basic_html. |
| position | Integer | Sorting weight for catalog display. |
Course Location (eduframe_course_location)
Physical or virtual venue data.
| Field Name | Type | Description |
|---|---|---|
| label | String | Name of the location |
| address | String | Primary street address. |
| address_line2 | String | Suite, building, or secondary info. |
| city / postal_code | String | Geographic identifiers. |
| country | String | ISO Country code. |
Taxonomies
The module utilizes two specific taxonomies to store metadata. The Mapper service translates external resource keys to the following Drupal fields:
Product Labels (labels)
Used for tagging products (e.g., "Summer Special," "Certificate Course").
| Drupal Field | Eduframe Source Key | Description |
|---|---|---|
| name | name | The text label shown to users. |
| field_color | color | Hexadecimal color code for UI rendering. |
Course Variants (course_variants)
Used to classify the nature or type of a variant.
| Drupal Field | Eduframe Source Key | Description |
|---|---|---|
| name | name | The variant name. |