openSideCart( )


Opens the Side Cart panel.

The openSideCart() function opens the Side Cart panel on the current page.

Notes:

  • We are gradually replacing the existing Mini Cart with the new Side Cart panel.
  • This function will fail when viewing the site on mobile because there is no Mini Cart on the mobile site.
  • The new Side Cart works on mobile sites. When Side Cart functionality becomes available for your site, openSideCart() will work on mobile.
Method Declaration
Copy
function openSideCart(): void;
Request
This method does not take any parameters
Open the Side Cart
JavaScript
import wixEcomFrontend from "wix-ecom-frontend"; $w("#myOpenSideCartButton").onClick(() => { // on button click - open the side cart wixEcomFrontend.openSideCart(); });
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?