routes
Allows you to generate standard URLs for the storefront.
Using the routes
object instead of hardcoding URLs helps ensure that your theme supports
multiple languages, as well as any possible changes in URL
format.
Properties
The account addresses page URL. Redirects to new customer accounts when enabled.
The account login page URL. Redirects to new customer accounts when enabled.
The URL to log a customer out of their account. Redirects to new customer accounts when enabled.
The password recovery page URL. Redirects to new customer accounts when enabled.
The account registration page URL.
The account page URL. Redirects to new customer accounts when enabled.
The all-products collection page URL.
The all-products collection is automatically generated by Shopify and contains all products in the store.
The URL for the
Cart API endpoint.
The URL for the
Cart API endpoint.
The URL for the
Cart API endpoint.
The URL for the
Cart API endpoint.
The collection list page URL.
The Predictive Search API URL.
TipTo learn about how to support predictive search in your theme, refer to Add predictive search to your theme.
The Product Recommendations API URL.
The search page URL.
New customer accounts login page. Redirects to the storefront page the customer was on before visiting the login page.
{
"account_addresses_url": "/account/addresses",
"account_login_url": "/account/login",
"account_logout_url": "/account/logout",
"account_recover_url": "/account/recover",
"account_register_url": "/account/register",
"account_url": "/account",
"all_products_collection_url": "/collections/all",
"cart_add_url": "/cart/add",
"cart_change_url": "/cart/change",
"cart_clear_url": "/cart/clear",
"cart_update_url": "/cart/update",
"cart_url": "/cart",
"collections_url": "/collections",
"predictive_search_url": "/search/suggest",
"product_recommendations_url": "/recommendations/products",
"root_url": "/",
"search_url": "/search",
"storefront_login_url": "/customer_authentication/login?return_to=%2Fservices%2Fliquid_rendering%2Fresource%3Ffast_storefront_renderer%3D1&locale=en"
}