Constructor
new VlocityDCReviewOrder()
Example
Sample Usage -
Include the component in your template by adding <c-dc-review-order> custom tag
<vlocity-dc-review-order userInfo={} billingAddress={} shippingAddress={} transactionDetails={} catalogCode="phones" cartContextKey="key" orderId="orderId" userInfo={email:"",name:""}></vlocity-dc-review-order>
KEY INFO -
events fired : "vlocity-dc-checkout-success"
Events registered :
| Event Name | Event source component | Callback Function | Description |
|--------------------------|-----------------------------|--------------------|-------------------------------------------------|
| vlocity-dc-submit-order | vlocity-dc-checkout | submitOrder() | Event triggered on click on submit order button |
Dependency - vlocity-dc-review-order is an independent component and has no dependency on any parent component.
Sample with slots -
<vlocity-dc-review-order>
<span slot="{slot_name}">
Custom HTML elements goes here
</span>
</vlocity-dc-review-order>
List of available slots -
| Slot names | Dynamic | Description | Impact |
|--------------------------------|-------------|-----------------------------------|--------------------------------|
| dc-contact-info | - | Wrapper for contact info | Replaces contact info |
| dc-billing-address | - | Wrapper for shipping address | Replaces shipping address |
| dc-shipping-address | - | Wrapper for billing address | Replaces billing address |
| dc-payment-transaction-details | - | Wrapper for transaction details | Replaces transaction details |
Extends
- LitElement
Methods
(static) disconnectedCallback()
disconnectedCallback () is invoked when c-dc-review-order is removed from the document’s DOM.
(static) handleSubmitOrderFailure()
A custom function to be used by customers for handling api failures
(static) routeToCheckout(Object)
Method to trigger pubsub event to the parent
Parameters:
Name | Type | Description |
---|---|---|
Object |
payload |
(async, static) submitOrder()
Method to submit the order.
(static) submitOrderGetInput()
Function to fetch the sign in user sdk call inputs
(static) submitOrderPostHook()
A custom function to be used by customers for customisation, any custom action after fetch offers call can be written here
(static) submitOrderPreHook()
A custom function to be used by customers for customisation, any custom action prior to fetch offers call can be written here
(static) submitOrderPreSDKCalls()
This function is used to do any changes prior to sdk calls
(static) submitOrderProcessResponse(response)
This function is used to process submitOrder response
Parameters:
Name | Type | Description |
---|---|---|
response |
object | Response Object from SDK call. |
(static) submitOrderSDKCall()
This function is used to do actual sdk calls