Description
This event fires after the user opened the Drawer via the Cart Launcher, by clicking the add to cart button or when the Drawer opens programmatically—for example with a JS method.
Arguments
Argument | Type | Description |
drawer | object | Holds the drawer with all options and properties. |
Example
window.addEventListener('DOMContentLoaded', (event) => {
const my_prefix = window.CartPops;
my_prefix.drawer.on( 'show', function( drawer ) {
console.log(`The ${drawer._type} showed up :)!`);
// Do Analytics or show something
} );
});
Keep in mind
Custom development is outside the scope of our support. However, if you’re looking for more advanced support, our team is happy to refer you to a trusted source.