Constructor
new DCOfferColorConfig()
Properties:
Name | Type | Description |
---|---|---|
attributeValues |
OfferAttributeObject | attributes of an offer. |
Example
Sample Usage -
Include the component in your template simply by adding c-dc-offer-color-config custom tag
<c-dc-offer-color-config attribute-values={attribute}></c-dc-offer-color-config>
| Attribute Name | Type Expected | Required |
|-------------------|---------------------------------------------------------------------------------|----------|
| attributeValues | It expects value in OfferAttributeObject format | required |
--------------------------------------------------------------------------------------------------------------------------------------
KEY INFO -
events fired :
| Event Name | Description |
|----------------------------------------|----------------------------------------------|
| vlocity-dc-color-selected | Event triggered when color selected |
| vlocity-dc-configure-offer-attributes | Event will trigger to save configured offer |
events registered : none
Sample with slots -
<c-dc-offer-color-config>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</c-dc-offer-color-config>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|-------------------------------|-------------|----------------------------------------------------|
| dc-wrapper | - | Wrapper for template | Replaces DOM |
Extends
Methods
(static) connectedCallback()
Invoked when c-dc-offer-color-config component is added to the document’s DOM.
(static) getSDKInstance()
This function gets digital commerce sdk instance
(static) selectOfferAttribute()
This function is called on change of selected offer attributes.
Properties:
Name | Type | Description |
---|---|---|
event |
eventObject | capture from Dom. |