Constructor
new DCAppliedPromotionList()
Properties:
Name | Type | Description |
---|---|---|
appliedPromoList |
Array.<Promotion> | list of promotions applied to the item. |
Example
Sample Usage -
Include the component in your template simply by adding c-dc-applied-promotion-list custom tag
<c-dc-applied-promotion-list applied-promo-list={offer.promotions}></c-dc-applied-promotion-list>
| Attribute Name | Type Expected | Required |
|-------------------|---------------------------------------------------------------------------------|----------|
| appliedPromoList | It expects an Array of Promotion object. | required |
| | | |
| | appliedPromoList Object Properties: | |
| | | Name | Type | Description | | |
| | |-------------|--------|------------------------------------------------| | |
| | | promocode | String | Indicates promotion code. | | |
| | | adjustemnt | Object | Indicates adjustment value. | | |
| | | |
--------------------------------------------------------------------------------------------------------------------------------------
KEY INFO -
events fired : vlocity-dc-remove-promo
| Event Name | Description |
|--------------------------------------|---------------------------------------------------------------|
| vlocity-dc-remove-promo | Event to update applied promotion list. |
events registered : none
Dependency - c-dc-applied-promotion-list is an independent component and has no dependency on parent component.
| Parent Component | Expected Child Component |
|------------------|---------------------------|
| none | none |
Sample with slots -
<c-dc-applied-promotion-list>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</c-dc-applied-promotion-list>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|---------------------------------------|-------------|----------------------------------------------------|
| dc-applied-promotion-list-wrapper | - | Wrapper for template | Replaces DOM |
Extends
Members
(static) adjustmentClass
Method to get css class name for promo adjustment
(static) promoAdjustment
Method to get promotion adjustment
Methods
(static) cancelDeleteOffer()
Method to cancel delete modal
(static) checkAppliedPromoLength()
Method to check if applied promotion length is more than zero.
(static) connectedCallback()
Invoked when c-dc-shopping-offer-details component is added to the document’s DOM.
(static) deleteOffer()
Method to delete applied promotion
(static) getSDKInstance()
Method to get digital commerce SDK instance.
(static) getTranslationLabels()
Method to get digital commerce translations.
(static) showDeleteWarningModal()
Method to show delete warning modal.