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

# Filter by availability

> Allow customers to search by the availability of items

<Info>
  Currently in beta - there are known bugs and limitations. For developer information see the [Methods filter developer docs](/developers/app-blocks/availability-search).
</Info>

Allow customers to search by the availability of items from the collection page.

<Frame type="glass">
  <iframe src="https://fast.wistia.net/embed/iframe/36gmcackb0?web_component=true&seo=true" title="Supercycle video" height="350" width="100%" allow="autoplay; fullscreen" frameborder="0" />
</Frame>

## Setup

<Steps>
  <Step title="Install Shopify Search & Discovery app">
    This is a free Shopify app that you need to install to use the Methods filter.

    For the filter to work you need to install the [Shopify Search & Discovery app](https://apps.shopify.com/search-and-discovery).
  </Step>

  <Step title="Create the Supercycle Methods metafield">
    You need to create a metafield definition for Supercycle Methods to enable filtering by method type.

    <Steps>
      <Step title="Navigate to metafields">
        Go to **Shopify** > **Settings** > **Custom data** > **Products** > **View unstructured metafields**.
      </Step>

      <Step title="Add the metafield definition">
        Find `supercycle.methods` and click **Add definition**.
      </Step>

      <Step title="Configure the metafield">
        Set the following:

        * **Name**: Supercycle Methods
        * **Type**: List of single line text
      </Step>

      <Step title="Enable filtering options">
        Turn on the following options:

        * **Filter on the product list and in the Admin API**
        * **Use as a condition in smart collections**
      </Step>

      <Step title="Save the metafield">
        Click **Save** to create the metafield definition.
      </Step>
    </Steps>
  </Step>

  <Step title="Add filters in Search & Discovery">
    <Steps>
      <Step title="Open the Search & Discovery app">
        Go to the Search & Discovery app in your Shopify admin.
      </Step>

      <Step title="Navigate to filters">
        Go to **Filters** and click **Add filter**.
      </Step>

      <Step title="Add Rental availability filter">
        Select source as **Rental availability** and save.
      </Step>

      <Step title="Add Supercycle Methods filter">
        Click **Add filter** again and select **Supercycle Methods** as the source.
      </Step>

      <Step title="Save your changes">
        Don't forget to save your changes before leaving the app.
      </Step>
    </Steps>
  </Step>

  <Step title="Find your collection section ID">
    You need to find the section ID of your collection page to configure the Methods filter block.

    <Steps>
      <Step title="Open the theme customizer">
        Go to **Shopify** > **Sales Channels** > **Online Store** > **Customize** and navigate to a collection page.
      </Step>

      <Step title="Open browser developer tools">
        Right-click on the page and select **Inspect** to open developer tools.
      </Step>

      <Step title="Go to the Network tab">
        In the developer tools, click on the **Network** tab.
      </Step>

      <Step title="Clear the network log">
        Click the clear button to clear any existing network requests.
      </Step>

      <Step title="Trigger a filter request">
        Click on one of the existing filters on the page (e.g., the price filter) and apply it. This will create a network request.
      </Step>

      <Step title="Find the filter request">
        In the network log, look for the filter request. If you used the price filter, you should see a request with `.price` in the name. Click on it.
      </Step>

      <Step title="Copy the section ID">
        From the request details, copy the section ID value. Close the developer tools when done.
      </Step>
    </Steps>
  </Step>

  <Step title="Activate the Methods Filter app block in your theme">
    To use the Methods Filter in your theme, you need to add the app block.

    <Steps>
      <Step title="Customize theme">
        From your Shopify admin, go to **Online store** and click **Customize** on the theme you want to add Supercycle to.
      </Step>

      <Step title="Add the Methods filter block">
        Go to a collection page, on the sidebar, click the **Add section** icon and click **apps**, then select the **Methods filter** block.
      </Step>

      <Step title="Configure the Methods filter block">
        In the Methods filter block settings, paste the section ID you copied earlier into the **Collection section ID** field.
      </Step>

      <Step title="Edit the app block settings">
        Edit the app block setting to set what types of filter you want, Membership, Calendar, or everything. (Language can be changed in Settings -> Language)
      </Step>

      <Step title="Save your theme changes">
        Don't forget to save your changes before leaving the theme customizer.
      </Step>

      <Step title="Hide the filters">
        Check it all works then you will then need to hide the **Rental availability** Search & Discovery filters with custom css.
      </Step>
    </Steps>
  </Step>
</Steps>
