Open page in storefront

When customer browses the store, Ecwid makes the navigation easy and fast due to the Ajax technology without any page reloads.

However, sometimes you may need to open a specific page in storefront automatically or after a user clicks on a link. This is where Ecwid.openPage method can be useful.

Open cart page in storefront:

Ecwid.openPage('cart');

The pages in storefront can be of two types:

  • general page like cart and shipping stage at checkout
  • page with parameters, like product, category, search, etc.

For general pages, you can only specify the name of the page you want to open. However, for pages with parameters, it is necessary that you specify what page you want to open exactly.

📘

Subscribe to the Ecwid.OnAPILoaded to ensure availability of this function.