/** * The wix-stores-frontend.Navigate module contains functionality for navigating to * store-related pages from frontend code. * * To use the Wix Stores Navigate API, import `{ navigate }` from the `wix-stores-frontend` module: * * ```javascript * import { navigate } from 'wix-stores-frontend'; * ``` */ export interface Navigate { /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [`wix-ecom-frontend.navigateToCartPage()`](https://dev.wix.com/docs/velo/api-reference/wix-ecom-frontend/navigate-to-cart-page). * * > #### 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()`](https://dev.wix.com/docs/velo/api-reference/wix-ecom-frontend/navigate-to-cart-page). * > * > To migrate to the new function: * > * > 1. Add the new import statement: * > * > ```javascript * > import wixEcomFrontend from "wix-ecom-frontend"; * > ``` * > * > 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. * * @returns Fulfilled - When the browser is directed to the site visitor's cart page. */ toCart(): Promise; /** * Navigates to the specified product's page. * * ![developer preview tag](https://user-images.githubusercontent.com/89579857/213133550-2b4fa3e8-e8fc-4513-a733-00abcc70925c.png) * * > **Note:** This method is supported in [sites](https://dev.wix.com/docs/develop-websites) and [mobile apps](https://www.wix.com/app-builder). * @param productId - ID of the product to navigate to. * @requiredField productId * @returns Fulfilled - When the browser or app is directed to the product's page. */ toProduct(productId: string): Promise; } /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [`wix-ecom-frontend.navigateToCartPage()`](https://dev.wix.com/docs/velo/api-reference/wix-ecom-frontend/navigate-to-cart-page). * * > #### 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()`](https://dev.wix.com/docs/velo/api-reference/wix-ecom-frontend/navigate-to-cart-page). * > * > To migrate to the new function: * > * > 1. Add the new import statement: * > * > ```javascript * > import wixEcomFrontend from "wix-ecom-frontend"; * > ``` * > * > 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. * * @returns Fulfilled - When the browser is directed to the site visitor's cart page. */ export function toCart(): Promise; /** * Navigates to the specified product's page. * * ![developer preview tag](https://user-images.githubusercontent.com/89579857/213133550-2b4fa3e8-e8fc-4513-a733-00abcc70925c.png) * * > **Note:** This method is supported in [sites](https://dev.wix.com/docs/develop-websites) and [mobile apps](https://www.wix.com/app-builder). * @param productId - ID of the product to navigate to. * @requiredField productId * @returns Fulfilled - When the browser or app is directed to the product's page. */ export function toProduct(productId: string): Promise;