VlocityDCTotalbar

VlocityDCTotalbar

vlocity-dc-totalbar is a web component to display the total cart prices.

Constructor

new VlocityDCTotalbar()

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.
disableBtn Boolean is button disabled or not.
Example
Sample Usage -

Include the component in your template simply by adding <vlocity-dc-totalbar> custom tag

<vlocity-dc-totalbar dueToday="500" dueMonthly="50" btnText="Checkout" btnEvent="initialise-checkout-evt"></vlocity-dc-totalbar>

--------------------------------------------------------------------------------------------------------------------------------------
 KEY INFO -

 events fired : {btnEvent}

 events registered : none

 Dependency - vlocity-dc-totalbar is an independent component and has no dependency on parent component.

  | Parent Component | Expected Child Component            |
  |------------------|-------------------------------------|
  | none             | none                                |


Sample with slots -

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

List of available slots -

| Slot names             | Dynamic     | Description                  | Impact                 |
|------------------------|-------------|------------------------------|------------------------|
| dc-totalbar-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

  • LitElement

Members

(static, readonly) properties

Properties that will be available in the binding system
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.

Methods

(static) initialiseCheckout()

callback function for event {btnEvent}.
Initialise checkout process.