Render the Shared Wishlist UI Container

Render the default wishlist shared UI in a container of your choice, in your custom page.

swat.ui.renderSharedWishlistInContainer

Create a page on the storefront with required HTML element and use the API to initialize the UI render within a SwymCallback. The URL to this page can be the shared wishlist landing page for the storefront. This URL will be passed a hkey or lid in the query parameter which will need to be passed to the API.

Definition

swat.ui.renderSharedWishlistInContainer(containerElement, sharedHkey, queryParams)

<!-- Include html in the body -->
<div id="swym-shared-wishlist-render-container"></div>
window.SwymCallbacks = window.SwymCallbacks || [];
window.SwymCallbacks.push(function(swat) {
  var queryParams = swat.utils.getEncodedAsObject(window.location.search);
  var sharedHkey = queryParams["hkey"] || queryParams["lid"];
  var sharedWishlistContainerElement = document.querySelector("#swym-shared-wishlist-render-container");
  swat.ui.renderSharedWishlistInContainer(sharedWishlistContainerElement, sharedHkey, queryParams);
});
ArgumentTypeDescription
wishlistContainerElementDOMElementTarget element to render User interface into
sharedHkeyStringShared hashkey to a list, usually a list id
queryParamsObjectQuery string as object

🚧

We are working on Improving this API

If you find any information lacking - kindly contact [email protected]