Constructor
new DCSampleApp()
Properties:
Name | Type | Description |
---|---|---|
apiUrl |
String | URL used to make rest API calls. |
checkoutApiUrl |
String | URL for making checkout related API's. |
secureServerApiRequestCredentials |
String | secureServerApiRequestCredentials. eg:include |
customCatalogCode |
string | optional parameter - custom catalog code to be rendered. |
checkoutPaymentUrl |
string | optional parameter - payment URL to be rendered. |
isCommunity |
string | optional parameter - whether components loaded inside community page or not. |
nameSpace |
string | optional parameter - namespace need to be updated in the SDK. |
- Source:
Example
Sample Usage -
Include the component in your template by adding <c-dc-sample-app> custom tag
<c-dc-sample-app></c-dc-offers-list>
KEY INFO -
events fired : none
Events registered :
| Event Name | Event source component | Callback Function | Description |
|----------------------------------|---------------------------|--------------------------|-------------------------------------------------|
| vlocity-dc-router | c-dc-assets-list | handleRouter() | Event triggered on routing |
| vlocity-dc-update-parent-catalog | c-dc-catalog | updateParentCatalogCode()| Event triggered on change of catalog code |
| vlocity-dc-update-catalog-code | c-dc-child-catalog | updateCatalogCode() | Event triggered on change of child catalog code |
| vlocity-dc-login-complete | c-dc-global-header | handleUserLogin() | Event triggered on login complete |
| vlocity-dc-sign-out | c-dc-global-header | handleUserLogin() | Event triggered on sign out |
List of available slots -
| Slot names | Dynamic | Description | Impact |
|------------------------|-------------|-------------------------------------------------------------|
| dc-global-header | - | Wrapper for global header | Replaces <c-dc-global-header> |
| dc-catalog | - | Wrapper for parent catalog | Replaces <c-dc-catalog> |
| dc-child-catalogs | - | Wrapper for child catalogs | Replaces <c-dc-child-catalogs>|
| dc-offers-list | - | Wrapper for offers list | Replaces <c-dc-offers-list> |
| dc-offer-config | - | Wrapper for offer config | Replaces <c-dc-offer-config> |
| dc-offer-addons | - | Wrapper for offer addons | Replaces <c-dc-offer-addons> |
| dc-shopping-cart | - | Wrapper for shopping cart | Replaces <c-dc-shopping-cart> |
| dc-check-out | - | Wrapper for check out | Replaces <c-dc-check-out> |
| dc-my-account | - | Wrapper for my account | Replaces <c-dc-my-account> |
Extends
Methods
(static) getSDKInstance()
Method to get digital commerce SDK instance.
- Source:
(static) handleRouter(data)
Callback method for router (vlocity-dc-router).
Parameters:
Name | Type | Description |
---|---|---|
data |
object | data to be passed while routing |
- Source:
(static) handleUserLogin(data)
Callback method for login success (vlocity-dc-login-complete).
Parameters:
Name | Type | Description |
---|---|---|
data |
object | data to be passed while routing |
- Source:
(static) updateCatalogCode(data)
Callback method for update child catalog code (vlocity-dc-update-catalog-code).
Parameters:
Name | Type | Description |
---|---|---|
data |
string | selected child catalog code. |
- Source:
(static) updateParentCatalogCode(data)
Callback method for update catalog code (vlocity-dc-update-parent-catalog).
Parameters:
Name | Type | Description |
---|---|---|
data |
string | selected catalog code. |
- Source: