VlocityDCAppliedPromotionList

VlocityDCAppliedPromotionList

vlocity-dc-applied-promotion-list is a web component for displaying all the applied promotions.

Constructor

new VlocityDCAppliedPromotionList()

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 vlocity-dc-applied-promotion-list custom tag

<vlocity-dc-applied-promotion-list .appliedPromoList=${offer.promotions}></vlocity-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 : vlocity-dc-remove-from-cart

 Dependency - vlocity-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 -

<vlocity-dc-applied-promotion-list>
   <span slot="{slot_name}">
     Custom HTML elements goes here
   </span>
</vlocity-dc-applied-promotion-list>

List of available slots -

| Slot names                            | Dynamic     | Description                 | Impact               |
|---------------------------------------|-------------|----------------------------------------------------|
| dc-applied-promotion-list-wrapper     | -           | Wrapper for template        | Replaces DOM         |

Extends

  • LitElement

Members

(static, readonly) properties

Properties that will be available in the binding system
Properties:
Name Type Description
appliedPromoList Array list of applied promotions
modalPopupDetails Object Popup details
showModalWarning Boolean Boolean value to show/hide popup

Methods

(static) deleteOffer(data)

callback function for event vlocity-dc-remove-from-cart.
Trigger to show modal popup
Parameters:
Name Type Description
data Object {'save':true}.

(static) showDeleteWarningModal(promo)

Trigger to show modal popup
Parameters:
Name Type Description
promo Object promo object.