Constructor
new DCCheckOut()
Example
Sample Usage -
Include the component in your template by adding <c-dc-check-out> custom tag
<c-dc-check-out due-today="900" due-monthly="90" catalog-code="phones" cart-context-key="key" checkout-api-url="URL" checkout-payment-url="URL"></c-dc-check-out>
KEY INFO -
events fired : "vlocity-dc-sign-in", "vlocity-dc-save-billing-address","vlocity-dc-router" and "vlocity-dc-submit-order"
Events registered :
| Event Name | Event source component | Callback Function | Description |
|--------------------------------|-----------------------------|----------------------------|-----------------------------------------|
| vlocity-dc-checkout-next-step | c-dc-total-bar | nextStep() | Event triggered on click on next button |
| vlocity-dc-checkout-success | c-dc-review-order | stepSuccessEventHandler() | |
| | c-dc-sign-in | | |
| | c-dc-update-billing-address | | |
Dependency - No dependencies
Sample with slots -
<c-dc-check-out>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</c-dc-check-out>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|------------------------|-------------|-----------------------------------------|----------------------------------------|
| dc-checkout | - | Wrapper for entire checkout | Replaces entire component body totalbar| |
| dc-terms-conditions | - | Wrapper for terms & conditions checkbox | Replaces terms & condition checkbox | |
Extends
Methods
(static) acceptTermsAndConditions(Object)
Method to handle user accepting terms and conditons.
Parameters:
Name | Type | Description |
---|---|---|
Object |
event |
(static) disconnectedCallback()
disconnectedCallback () is invoked when c-dc-check-out is removed from the document’s DOM.
(static) getSDKInstance()
Method to get digital commerce SDK instance.
(static) initPaymentPostHook()
A custom function to be used by customers for customisation, any custom action after fetch offers call can be written here
(static) loadPaymentCallback()
Method to capture callback when payment is received.
(static) loadTranslationLabels()
Method to load translation labels.
(static) nextStep()
Method to trigger next checkout step.
(static) saveStep(Object)
Method to save the results on every step success.
Parameters:
Name | Type | Description |
---|---|---|
Object |
data |
(static) updateSteps()
Method to advance progress indicator to the next step