Constructor
new VlocityDCUpdateBillingAddress()
Example
Sample Usage -
Include the component in your template by adding <vlocity-dc-update-billing-address> custom tag
<vlocity-dc-update-billing-address></vlocity-dc-update-billing-address>
KEY INFO -
events fired : "vlocity-dc-checkout-success"
events registered :
| Event Name | Event source component | Callback Function | Description |
|----------------------------------|-----------------------------|----------------------|-----------------------------------------|
| vlocity-dc-save-billing-address | vlocity-dc-checkout | saveBillingDetails() | Event triggered on click on next button |
Dependency - vlocity-dc-update-billing-address is an independent component and has no dependency on any parent component.
Sample with slots -
<vlocity-dc-update-billing-address>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</vlocity-dc-update-billing-address>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|-----------------------|-----------|-------------------------------|---------------------------|
| dc-billing-address | - | Wrapper for billing address | Replaces billing address |
| dc-shipping-address | - | Wrapper for shipping address | Replaces shipping address |
| dc-title | - | Wrapper for header title | Replaces header title |
Extends
- LitElement
Methods
(static) checkValidationErrors()
Method to validate the shipping and billing address forms.
(static) handleBillingAddressChange(Object)
Method to save the billing address.
Parameters:
Name | Type | Description |
---|---|---|
Object |
event |
(static) handleSameShippingAddress()
Method to copy billing address to the shipping address.
(static) handleSaveBillingDetailsFailure()
A custom function to be used by customers for handling api failures
(static) handleShippingAddressChange(Object)
Method to save the shipping address.
Parameters:
Name | Type | Description |
---|---|---|
Object |
event |
(static) routeToCheckout(Object)
Method to trigger pubsub event to the parent
Parameters:
Name | Type | Description |
---|---|---|
Object |
payload |
(async, static) saveBillingDetails()
Method to save the billing 7 shipping address.
(static) saveBillingDetailsGetInput()
Function to fetch the sign in user sdk call inputs
(static) saveBillingDetailsPostHook()
A custom function to be used by customers for customisation, any custom action after fetch offers call can be written here
(static) saveBillingDetailsPreHook()
A custom function to be used by customers for customisation, any custom action prior to fetch offers call can be written here
(static) saveBillingDetailsPreSDKCalls()
This function is used to do any changes prior to sdk calls
(static) saveBillingDetailsProcessResponse(response)
This function is used to process saveBillingDetails response
Parameters:
Name | Type | Description |
---|---|---|
response |
object | Response Object from SDK call. |
(static) saveBillingDetailsSDKCall()
This function is used to do actual sdk calls