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.

PropertiesTypeDescription
account_addresses_urlstringThe page URL of the account addresses. Redirects to new customer accounts when enabled.
account_coupon_urlstringThe page URL of the account coupon.
account_login_urlstringThe page URL of the account login. Redirects to new customer accounts when enabled.
account_order_urlstringThe page URL of the account order.
account_register_urlstringThe page URL of the account registration.
account_reset_password_urlstringThe page URL of the account of the reset password.
account_reset_success_urlstringThe page URL of the account of the reset success.
account_urlstringThe account page URL. Redirects to new customer accounts when enabled.
cart_urlstringThe page URL of the cart.
notfound_urlstringThe page URL of the account not-found.
order_lookup_urlstringThe page URL of the account order-lookup.
password_urlstringThe page URL of the account password.
root_urlstringThe index (home page) URL.
search_urlstringThe search page URL.
{
  "root_url": "/",
  "account_url": "/account",
  "account_coupon_url": "/account/coupon",
  "account_login_url": "/account/login",
  "account_register_url": "/account/register",
  "account_addresses_url": "/account/addresses",
  "search_url": "/search",
  "cart_url": "/cart",
  "account_reset_password_url": "/account/resetpw",
  "account_reset_success_url": "/account/resetrs",
  "account_order_url": "/account/order",
  "order_lookup_url": "/account/order_lookup",
  "notfound_url": "/404",
  "password_url": "/password"
}