Create custom pop-ups using Quickviews
- Topics:
- Configuration
CREATED FOR:
- Admin
- User
- Developer
The default Quickview is used in ecommerce experiences whereby a pop-up is displayed with product information to drive a purchase. However, you can trigger custom content to display in the pop-ups. Depending on the viewer you are using, this functionality lets users click on a hotspot, or a thumbnail image, or on an image map to see information or related content.
Quickviews are supported by the following viewers in Dynamic Media:
- Interactive Images (clickable hotspots)
- Interactive Video (clickable thumbnail images during video playback)
- Carousel Banners (clickable hotspots or image maps)
While the functionality of each viewer differs, the process of creating a Quickview is the same across all three supported viewers.
To create custom pop-ups using Quickviews:
-
Create a Quickview for an uploaded asset.
You typically create a Quickview the same time you edit an asset for use with the viewer you are using.
Viewer you are using Complete these steps to create the Quickview Interactive Images Adding hotspots to an image banner. Interactive Videos Adding interactivity to your video. Carousel Banners Adding Hotspots or Image Maps to a Banner. -
Obtain the viewer embed code to Integrate the viewer within your website.
Viewer you are using Complete these steps to integrate the viewer with your website Interactive image Integrating an interactive image with your website. Interactive video Integrating an interactive video with your website. Carousel banner Adding a carousel banner to your website page. -
The viewer you are using now needs to know how to use the Quickview.
To do this the viewer uses a handler called
QuickViewActive
.Example
Suppose you were using the following sample embed code on your web page for an interactive image:The handler is loaded into the viewer using
setHandlers
:*viewerInstance*.setHandlers({ *handler 1*, *handler 2*}, ...
Using the sample embed code example from above, we have the following code:
s7interactiveimageviewer.setHandlers({ quickViewActivate": function(inData) { var sku=inData.sku; var genericVariable1=inData.genericVariable1; var genericVariable2=inData.genericVariable2; loadQuickView(sku,genericVariable1,genericVariable2); } })
Learn more about
setHandlers()
method at the following:- Interactive Image viewer: setHandlers
- Interactive Video viewer: setHandlers
-
You now need to configure the
quickViewActivate
handler.The quickViewActivate handler controls the Quickviews in the viewer. The handler contains the variable list and function calls for use with the Quickview. The embed code provides mapping for the SKU variable set in the Quickview as well as a sample loadQuickView function call.
Variable mapping
Map variables for use in your web page to the SKU value and generic variables contained in the Quickview:var *variable1*= inData.*quickviewVariable*
The provided embed code has a sample mapping for the SKU variable:
var sku=inData.sku
Map additional variables from the Quickview too, as in the following:
var <i>variable2</i>= inData.<i>quickviewVariable2</i> var <i>variable3</i>= inData.<i>quickviewVariable3</i>
Function call
The handler also requires a function call for the Quickview to work. The function is assumed to be accessible by your host page. The embed code provides a sample function call:loadQuickView(sku)
The sample function call assumes the function
loadQuickView()
exists and is accessible.Learn more about quickViewActivate method at the following:
- Interactive Image viewer – Event callbacks
- Interactive Video viewer – Event callbacks
- Interactive data support in Interactive Video viewer – Interactive data support
-
Do the following:
-
Uncomment the setHandlers section of the embed code.
-
Map any additional variables contained in the Quickview.
- Update the
loadQuickView(sku,*var1*,*var2*)
call if you are adding additional variables.
- Update the
-
Create a simple loadQuickView () function on page, outside of the viewer.
For example, the following writes the value of sku to the browser console:
function loadQuickView(sku){ console.log ("quickview sku value is " + sku); }
-
Upload a test HTML page to a webserver and open.
With the variables from the Quickview mapped and the function call in place, the browser console writes the variable value to the browser console using the sample function provided.
-
-
You can now use a function to invoke a simple pop-up in the Quickview. The following example uses a
DIV
for a popup. -
Style the pop-up
DIV
in the following manner. Add your own additional styling as desired.<style type="text/css"> #quickview_div{ position: absolute; z-index: 99999999; display: none; } </style>
-
Place the pop-up
DIV
in the body of your HTML page.One of the elements is set with an ID that is updated with sku value when the user invokes a Quickview. The example also includes a simple button to hide the pop-up again after it becomes visible.
<div id="quickview_div" > <table> <tr><td><input id="btnClosePopup" type="button" value="Close" onclick='document.getElementById("quickview_div").style.display="none"' /><br /></td></tr> <tr><td>SKU</td><td><input type="text" id="txtSku" name="txtSku"></td></tr> </table> </div>
-
Add a function to update the sku value in the pop-up; make the pop-up visible by replacing the simple function created in step 5. with the following:
<script type="text/javascript"> function loadQuickView(sku){ document.getElementById("txtSku").setAttribute("value",sku); // write sku value document.getElementById("quickview_div").style.display="block"; // show popup } </script>
-
Upload a test HTML page to your webserver and open. The viewer displays the pop-up
DIV
when a user invokes a Quickview. -
How to display the custom pop-up in full screen mode
Some viewers, such as the Interactive Video viewer, support display in fullscreen mode. However, using the pop-up as described in the previous steps causes it to display behind the viewer while in full screen mode.
To have the pop-up display in both standard and full screen modes, you attach the pop-up to the viewer container. To accomplish this, you can use a second handler method,
initComplete
.The
initComplete
hander is invoked after the viewer is initialized."initComplete":function() { code block }
Learn more about
init()
method at the following: -
To attach the pop-up–described in the previous steps–to the viewer, use the following code:
"initComplete":function() { var popup = document.getElementById('quickview_div'); popup.parentNode.removeChild(popup); var sdkContainerId = s7interactivevideoviewer.getComponent("container").getInnerContainerId(); var inner_container = document.getElementById(sdkContainerId); inner_container.appendChild(popup); }
In the code above, we have done the following:
- Identified our custom pop-up.
- Removed it from the DOM.
- Identified the viewer container.
- Attached the pop-up to the viewer container.
-
Your entire setHandlers code should now look similar to the following (Interactive Video viewer was used):
s7interactivevideoviewer.setHandlers({ "quickViewActivate": function(inData) { var sku=inData.sku; loadQuickView(sku); }, "initComplete":function() { var popup = document.getElementById('quickview_div'); // get custom quick view container popup.parentNode.removeChild(popup); // remove it from current DOM var sdkContainerId = s7interactivevideoviewer.getComponent("container").getInnerContainerId(); var inner_container = document.getElementById(sdkContainerId); inner_container.appendChild(popup); } });
-
After the handlers are loaded, you initialize the viewer:
*viewerInstance.*init()
Example
This example uses the Interactive image viewer.s7interactiveimageviewer.init()
After you embed the viewer into your host page, be sure that the viewer instance is created and the handlers are loaded before the viewer is invoked using
init()
.
Experience Manager
- Assets user guide
- AEM 6.4 Assets release notes
- About DAM
- User experience improvements
- Best practices for assets
- Use AEM Assets
- Dynamic Media
- Dynamic Media newsletter archive by Experience League
- Setting up Dynamic Media
- Working with Dynamic Media
- Configuring Dynamic Media - Scene7 mode
- Configuring Dynamic Media - Hybrid mode
- Troubleshooting Dynamic Media - Scene7 mode
- Managing Dynamic Media assets
- Best practices for optimizing the quality of your images
- Managing Dynamic Media Viewer Presets
- Applying Dynamic Media Viewer Presets
- Managing Dynamic Media Image Presets
- Applying Dynamic Media Image Presets
- Dynamic Media Video Profiles
- Dynamic Media Image Profiles
- Smart Imaging
- Smart Imaging with client-side Device Pixel Ratio
- Video
- HTTP2 delivery of content
- Delivering Dynamic Media assets
- Activating hotlink protection in Dynamic Media
- Dynamic Media limitations
- Image Sets
- Mixed Media Sets
- Spin Sets
- Panoramic Images
- Video
- Interactive Images
- Interactive Videos
- Carousel Banners
- Using Quickviews to create custom pop-ups
- Delivering optimized images for a responsive site
- Previewing Dynamic Media assets
- Adding Dynamic Media assets to pages
- Adding Dynamic Media Classic components to pages
- Embedding the Dynamic Video or Image viewer on a web page
- Linking URLs to your web application
- Using Rulesets to transform URLs
- Publishing Dynamic Media assets
- Invalidating your CDN cached content
- Installing Feature Pack 18912 for bulk asset migration
- Working with Selectors
- Extend Assets
- Administer Assets
- Assets supported formats
- Search facets
- Managing Metadata for assets
- XMP writeback to renditions
- Asset link sharing
- Asset reports
- Enhanced Smart Tags
- Profiles for processing metadata, images, and videos
- Cascading metadata
- Create and configure Asset Editor pages
- Assets sizing guide
- Metadata Schemata Reference
- Best practices for translating assets efficiently
- Assets performance tuning guide
- How to edit or add metadata
- Assets migration guide
- XMP metadata
- Assets network considerations
- AEM Assets vs. AEM MediaLibrary
- Using PDF rasterizer
- Configuring asset upload restrictions
- AEM and Creative Cloud integration best practices
- Configure Adobe Asset Link
- Integrating AEM Assets with InDesign server
- Metadata profiles
- Digital Rights Management in Assets
- Using demo package for Assets Insights
- Assets Offloading Best Practices
- Assets file format best practices
- Assets Monitoring Best Practices
- Camera Raw Support
- Detecting MIME Type of Assets Using Apache Tika
- Imaging Transcoding Library
- Support for IPTC Metadata
- Metadata Schemas
- Multi-tenancy for Collections, Snippets, and Snippet Templates
- Watermarking
- Bulk Metadata Import and Export
- Asset Templates
- AEM to Creative Cloud Folder Sharing Best Practices
- Folder Metadata Schema
- Managing Smart Tags
- Brand Portal
- Content Fragments
- Working with Content Fragments
- Managing Content Fragments
- Content Fragment Models
- Variations - Authoring Fragment Content
- Content Fragment Associated Content
- Metadata - Fragment Properties
- Content Fragments - Delete Considerations
- Content Fragments - Markdown
- Creating translation projects for Content Fragments
- Manage Assets
- Managing Assets with the Touch-Optimized UI
- Managing multiple assets and collections
- Asset selector
- Managing Collections
- Check in and check out files in Assets
- Configure asset tagging using the Smart Content Service
- Enabling duplicate detection
- Enhanced sorting of assets in AEM
- Organize digital assets
- Managing video assets
- Creating Translation Projects
- Preparing Assets for Translation
- Download assets from AEM
- Asynchronous Operations
- Lightbox
- Enabling Assets Insights through DTM
- Configuring Assets Insights
- Applying translation cloud services to folders
- Using Page Tracker and Embed code in web pages
- Managing Compound Assets
- Related Assets
- Assets Insights
- Searching Video Assets
- Private folder sharing
- Smart Content Service Training Guidelines
- Video renditions
- Integration with other solutions
The Perfect Blend: A New Era of Collaboration with AEM and Workfront
Adobe Customer Success Webinars
Wednesday, Apr 2, 5:00 PM UTC
Explore how Adobe Experience Manager and Workfront integrate to help teams move from ideation to delivery without the usual bottlenecks, ensuring content is organized, on-brand, and ready to go live faster.
RegisterAdobe Experience Manager Assets at Summit
Register for these sessions:
- The True Cost of a Failed Implementation (attend online)
- The Future of Digital Asset Management (attend online)
- Rapid Feature Releases with AEM Cloud: Telegraph Media Group’s RDE Strategy (attend online)
- Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI (attend online)
- A Damn Good DAM: Intel’s Blueprint for Enterprise-Wide Asset Management (attend online)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more