Steps:
div and give it an id.showQuickView in your desired event handler and pass
it an array of products and the id of the element you created in step 1. The component will appear.Array<number> productIds, string targetElementId, object options)| Name | Description |
|---|---|
| showQuickView | Opens a modal in which the quick view is visible showing the given products.Throws error if the first argument is empty array or the element with the given id does not exist. |
The options parameters is for configuring quickview to either be in registry or purchase mode. The default is purchase
purchase mode: In this mode, quickview shows addtobag, addtolist and checkout buttons which is the typical use case.registry mode: This mode is only used to add products to registry. In this case, a callbackUrl must be passed in the options to which the user gets redirected after logging in. Also, this url must be registered per campaign environment. You need to contact IMP team for this to create a JIRA ticket. Example 1:
// default mode. no options is passed:
ImpSdk.showQuickView([1780432, 1112201, 1749657], 'targetElementId');
Example 2
// registry mode
var options = {
productActionType: 'registry',
loginCallbackUrl: 'www.macys.com/social/blackfriday'
};
ImpSdk.showQuickView([1780432, 1112201, 1749657], 'targetElementId', options);