Constructor
new DCTotalBar()
Properties:
Name | Type | Description |
---|---|---|
dueToday |
Number | one time total charge of shopping cart. |
dueMonthly |
Number | recurring time total charge of shopping cart. |
btnText |
String | text to be displayed for button in UI. |
btnEvent |
String | event to be triggered on button click callback. |
Example
Sample Usage -
Include the component in your template simply by adding <c-dc-total-bar> custom tag
<c-dc-total-bar due-today="500" due-monthly="50" btn-text="Checkout" btn-event="initialise-checkout-evt"></c-dc-total-bar>
--------------------------------------------------------------------------------------------------------------------------------------
KEY INFO -
events fired : {btnEvent}
events registered : none
Dependency - c-dc-total-bar is an independent component and has no dependency on parent component.
| Parent Component | Expected Child Component |
|------------------|-------------------------------------|
| none | none |
Sample with slots -
<c-dc-total-bar>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</c-dc-total-bar>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|------------------------|-------------|------------------------------|------------------------|
| dc-total-bar-wrapper | - | Wrapper for component | Replaces template DOM |
| dc-extra-price-info | - | Extra column at Price info | Adds new column |
| dc-next-button | - | Next button | Replaces Button |
Extends
Methods
(static) btnClicked()
Trigger to fire event when user click on custom button
(static) getSDKInstance()
This function gets digital commerce sdk instance
(static) getTranslationLabels()
Method to get digital commerce SDK instance.