toCart( )


Deprecated. This function will continue to work, but a newer version is available at wix-ecom-frontend.navigateToCartPage().

Migration Instructions

If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to wix-ecom-frontend.navigateToCartPage().

To migrate to the new function:

  1. Add the new import statement:

    Copy
  2. Look for any code that uses navigate.toCart(), and replace it with wixEcomFrontend.navigateToCartPage().

  3. Test your changes to make sure your code behaves as expected.

Directs the browser to navigate to the site visitor's cart page.

The toCart() function navigates the browser to the site visitor's cart page.

Method Declaration
Copy
Request
This method does not take any parameters
Was this helpful?
Yes
No