Skip to main content

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.
info

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 NameTypeDescription
labelStringThe name of the product (name).
slugStringURL-friendly identifier (slug).
categoryEntity ReferencePoints to eduframe_category (category_id).
labelsEntity ReferenceMulti-value reference to labels taxonomy (label_ids).
costDecimalThe numerical price of the product (cost).
currencyStringISO currency code, e.g., USD/EUR (currency).
cost_schemeStringThe pricing model applied to the product (cost_scheme).
signup_urlStringExternal link to the Eduframe checkout (signup_url).
avatarMedia ReferenceReference to a Drupal Media entity (Source: avatar).
course_tab_contentsString (Long)Serialized JSON containing tabbed course details (course_tab_contents).
positionIntegerSorting weight for catalog display (position).
productable_typeStringThe underlying Eduframe resource type (productable_type).
customString (Long)Custom fields/metadata stored in JSON format (custom).
info

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.

info

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 NameTypeDescription
labelStringThe name of the variant (name).
catalog_productEntity ReferenceParent eduframe_catalog_product (product_id).
course_locationEntity ReferencePoints to eduframe_course_location (properties.course_location_id).
course_variantEntity ReferencePoints to course_variants taxonomy (properties.course_variant_id).
skuStringStock Keeping Unit identifier (sku).
availabilityStringStatus string, e.g., "available", "full" (availability).
available_placesIntegerCurrent remaining capacity (available_places).
costDecimalThe numerical price of this specific variant (cost).
currencyStringISO currency code (currency).
cost_schemeStringThe pricing model applied to the variant (cost_scheme).
start_dateDateTimeThe specific start schedule for this variant (properties.start_date).
end_dateDateTimeThe specific end schedule for this variant (properties.end_date).
typeStringThe variant property type, e.g., "planned" (properties.type).
customString (Long)Custom fields/metadata stored in JSON format (custom).

Category (eduframe_category)

Hierarchical organizational units for the catalog.

Field NameTypeDescription
parent_idStringThe Eduframe ID of the parent category.
descriptionText (Long)Processed text field using basic_html.
positionIntegerSorting weight for catalog display.

Course Location (eduframe_course_location)

Physical or virtual venue data.

Field NameTypeDescription
labelStringName of the location
addressStringPrimary street address.
address_line2StringSuite, building, or secondary info.
city / postal_codeStringGeographic identifiers.
countryStringISO 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 FieldEduframe Source KeyDescription
namenameThe text label shown to users.
field_colorcolorHexadecimal color code for UI rendering.

Course Variants (course_variants)

Used to classify the nature or type of a variant.

Drupal FieldEduframe Source KeyDescription
namenameThe variant name.