- Open theme code
-
Online Store > Themes > Action > Edit code
- Find a file called
cart-notification.js
under the Assets
category
- Find following lines of code
renderContents(parsedState) {
this.cartItemKey = parsedState.key;
this.getSectionsToRender().forEach((section => {
document.getElementById(section.id).innerHTML =
this.getSectionInnerHTML(parsedState.sections[section.id], section.selector);
}));
if (this.header) this.header.reveal();
this.open();
}
- Comment out two lines that trigger the opening of the popup by enclosing them in
/*
and */
- It should look like this
renderContents(parsedState) {
this.cartItemKey = parsedState.key;
this.getSectionsToRender().forEach((section => {
document.getElementById(section.id).innerHTML =
this.getSectionInnerHTML(parsedState.sections[section.id], section.selector);
}));
/*
if (this.header) this.header.reveal();
this.open();
*/
}
- Save the code
- Refresh the product page.
- Try adding a product to the cart, the popup will not open.