Product Codes¶
This webcomponent is responsible for rendering product codes on the product card. It listens to all the changes that are being made across the application and automatically updates the component.
Attributes¶
Attribute name | Type | Description |
---|---|---|
product-id (mandatory) | string | Tell the component which product should it refer to |
Children of the Product Codes¶
Each child of the product-codes
component should have a data-product-code
attribute that specifies which code should the child refer to. Each child can only refer to one code.
Event Bus events¶
This webcomponent listens to the following events with the Event Bus:
Example¶
<product-codes product-id="5">
<div data-product-code="ean">1234567890</div>
<div data-product-code="isbn">12-3-456-78-9-0</div>
</product-codes>
Children attributes¶
Attribute name | Type | Description |
---|---|---|
data-product-code (mandatory) | string | Tell the child which code should it refer to. Each child can only refer to one code |