Constructor
new DCOfferGroupSelection()
Properties:
Name | Type | Description |
---|---|---|
childProduct |
OfferObject | child offer object |
currentPlanGroup |
OfferProductGroupObject | current plan group |
type |
String | c-dc-offer-group-selection type(e.g. "radio" or "checkbox") |
price |
String | One Time or recurring charge value |
currencySymbol |
String | symbol of currency used in transaction.productImage |
productImage |
String | image URL for product image. |
isRadio |
Boolean | c-dc-offer-group-selection is radio or not. |
isRecurring |
Boolean | price type is recurring or one time. |
Example
Sample Usage -
Include the component in your template simply by adding c-dc-offer-group-selection custom tag
<c-dc-offer-group-selection type="radio" child-product={planOption} currentplangroup={currentPlanGroup} is-recurring=false></c-dc-offer-group-selection>
--------------------------------------------------------------------------------------------------------------------------------------
KEY INFO -
events fired :
| Event Name | Description |
|--------------------------------------|---------------------------------------------------------------|
| vlocity-dc-save-child-offers | Save the child addons in c-dc-offer-addons component | |
events registered : None
Dependency - c-dc-offer-group-selection is dependent on c-dc-offer-group component.
| Parent Component | Expected Child Component |
|------------------|-----------------------------|
| c-dc-offer-group | None |
Sample with slots -
<c-dc-offer-group-selection>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</c-dc-offer-group-selection>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|---------------------------------------|-------------|-----------------------------------------------------------|
| dc-group-selection-radio-wrapper | - | Wrapper for component | Replaces template DOM |
| dc-product-description | - | Wrapper for productDescription | Replaces DOM |
| dc-product-payment | - | Wrapper for productPaymentSlot | Replaces DOM |
| dc-group-selection-checkbox-wrapper | - | Wrapper for checkbox | Replaces DOM |
| dc-product-description | - | Wrapper for productDescription | Replaces DOM |
| dc-child-product-payment | - | Wrapper for childProductPayment | Replaces DOM |
Extends
Methods
(static) connectedCallback()
Invoked when c-dc-offer-group-selection component is added to the document’s DOM.
(static) getSDKInstance()
This function gets digital commerce sdk instance
(static) getTranslationLabels()
Method to get digital commerce translations.
(static) triggerSaveChildOfferEvent()
trigger the save child offer event
(static) updateAddon()
saving the configured child offer