Links between Attribute Module and Other Modules
This document showcases the module links defined between the Attribute Module and other Commerce Modules.Summary
The Attribute Module has the following links to other modules:| First Data Model | Second Data Model | Type | Description |
|---|---|---|---|
| Product | AttributeValue | Stored - many-to-many | Associates products with their attribute values |
| ProductCategory | Attribute | Stored - many-to-many | Associates product categories with their applicable attributes |
Product Module
Mercur defines a link between the Product Module’sProduct data model and the Attribute Module’s AttributeValue data model. This allows products to have multiple attribute values assigned to them (e.g., Material: “Cotton”, Color: “Blue”).
Retrieve with Query
To retrieve the attribute values of a product with Query, passattribute_value_link.attribute_value.* in fields:
- query.graph
- useQueryGraphStep
Manage with Link
To manage the attribute values of a product, use Link:- link.create
- createRemoteLinkStep
Product Module - Categories
Mercur defines a link between the Product Module’sProductCategory data model and the Attribute Module’s Attribute data model. This allows product categories to define which attributes are applicable for products in that category (e.g., “Electronics” category might have “Battery Life” and “Screen Size” attributes).
Retrieve with Query
To retrieve the attributes of a product category with Query, passattribute_link.attribute.* in fields:
- query.graph
- useQueryGraphStep
Manage with Link
To manage the attributes of a product category, use Link:- link.create
- createRemoteLinkStep