> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bouquet-inc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Redirecting to the classic customer accounts login page

> For stores using classic customer accounts: send customers who tap a favorite button while signed out to the classic login page.

When a signed-out customer taps a favorite button, they are sent to the Shopify new customer accounts login page. If your store uses classic customer accounts, add one script to your theme to send them to the classic login page (`/account/login`) instead. After signing in, they return to the page they were on.

## Setup

In the theme code editor, open `layout/theme.liquid` and add the following script just before `</body>`.

```html theme={null}
<script>
  if (window.multilikesConfig) {
    window.multilikesConfig.loginUrl =
      '/account/login?return_url=' + encodeURIComponent(location.pathname + location.search);
  }
</script>
```

This applies to every favorite button in the app (products, brands, stores, collections, pages, and articles). If "Unauthenticated button behavior" is set to "Show login guidance", the sign-in button in the guidance goes to the same page.

> [!WARNING]
>
> The script has no effect if you add it before `</head>`, for example right after `{{ content_for_header }}`. Always add it just before `</body>`.

## How to check

Sign out, open a product page, and tap the favorite button. If the address bar shows `/account/login?return_url=...`, the setup is complete.

> [!NOTE]
>
> To return customers to the original page after they sign in, your login page must use Shopify's standard login form (`{% form 'customer_login' %}`). If you have customized the login page, check that its source contains an input with `name="return_url"`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.