-
Notifications
You must be signed in to change notification settings - Fork 1
Attribute Mapping
The attribute mapping page provides a two-panel AJAX interface for mapping WooCommerce product attributes to Mirakl attributes and their allowed values.
Navigate to Mirakl → Attribute Mapping in the WordPress admin.
The page has two panels:
- Displays the Mirakl category hierarchy from the TBCATALOG classification XML
- Each node shows the category code, label, and an indicator (leaf vs parent)
- Clicking a category loads its associated attributes in the right panel
- The tree is searchable via the filter input at the top
When a category is selected, the right panel shows all PM11 attributes associated with that category:
- Attribute Code — The Mirakl attribute code
- Attribute Label — Human-readable label (locale-filtered)
- Parameter ID — Mirakl parameter ID for API operations
- Type — Attribute type (text, numeric, list, etc.)
- Required — Whether the attribute is required for this category
- Value Mapping — A dropdown to select the corresponding WooCommerce attribute or product field to map
For attributes with allowed values (VL11), clicking Edit Values opens a panel showing:
- The complete list of allowed VL11 values
- A WooCommerce attribute value selector for each Mirakl value
- Locale filtering: values whose label has a locale suffix (e.g.,
[de_DE]) that doesn't match the store's language are hidden from the autocomplete - Values without locale suffixes are shared and always visible
| API | Data | Update Method |
|---|---|---|
| PM11 | Attribute hierarchy (categories → parameters) | Automatic on category tree load |
| VL11 | Allowed values for list-type attributes | Automatic on panel load |
| TBCATALOG | Classification categories | Automatic on page load |
All data is cached in the mirakl_attributes table for performance.
The attribute data is fetched from Mirakl's APIs and cached locally. There is no automatic refresh — cached data is used until the attribute mapping page is loaded again, which triggers a fresh fetch.
Use the Sync Attributes button on the page to force a refresh if Mirakl attributes have been updated.
Attribute mappings are stored as product meta. The specific meta key format depends on the attribute type and store configuration:
- Free-text attributes → Standard WooCommerce product meta
- List-type attributes → WooCommerce attribute taxonomies
- Category-specific →
_mirakl_attr_{param_id}meta keys