Brickspace Lab
Contact usContact ShopifyTry a theme
Paper
Paper
  • Paper documentation
  • Getting started
    • Theme basics
    • Theme settings
      • Colors
      • Typography
      • Borders
      • Quick Add
  • Guides
    • Products
      • Product badges
      • Product subtitles
      • Variant swatches
      • Fixed buy buttons
      • Replacing “Add to cart”
  • Collections
    • Variant filtering
    • Disabling Quick add
  • Sitewide
    • Using device specific visibility
    • Dynamic discount popups
    • Creating a Mapbox API key
  • Migrating custom changes
  • Templates
    • Collection template
      • Customizing Filters
      • Adding Tag Filtering
      • Adding Nested Menu
      • Collection Blocks
  • Product template
    • Dynamic variant images
    • Gift cards
    • Quantity picker
    • Subscription options
    • Sibling products
    • Bundled products
    • Custom fields
    • Content drawers
  • Blog template
  • Sections
  • Sections
    • Featured product
    • Slideshow
    • Email sign-up
    • Video
    • Alternative banner
    • Alternative collection grid
    • Banner
    • Blog posts grid
    • Collage
    • Collapsible content
    • Collection list grid
    • Collection list slider
    • Comparison table
    • Contact form
    • Countdown
    • Custom liquid
    • Discount banner
    • Featured collection grid
    • Featured collection slider
    • Icon grid
    • Image comparison
    • Image hotspot
    • Logo list
    • Navigation slider
    • Recently viewed
    • Rich text
    • Slider
    • Store locator
    • Testimonials
    • Cart drawer
    • Header
  • General
    • Changelog
      • v8.0.1
      • v8.0.0
      • v7.6.2
      • v7.6.1
      • v7.6.0
      • v7.5.0
      • v7.4.0
      • v7.3.0
      • v7.2.1
      • v7.2.0
      • v7.1.2
      • v7.1.1
      • v7.1.0
      • v7.0.0
      • v6.2.0
      • v6.1.7
      • v6.1.6
      • v6.1.5
      • v6.1.4
      • v6.1.3
      • v6.1.2
      • v6.1.1
      • v6.1.0
      • v6.0.1
      • v6.0.0
      • v5.2.0
      • v5.1.0
      • v5.0.1
      • v5.0.0
      • v4.1.1
      • v4.1.0
      • v4.0.0
      • v3.0.2
      • v3.0.1
      • v3.0.0
      • v2.0.0
      • v1.2.2
      • v1.2.1
      • v1.2.0
      • v1.0.0
    • Known issues and troubleshooting
      • v8.0.1
    • Cloning a demo theme
      • Poster
      • Parts
      • Pastel
      • Page 3
      • Page 4
Powered by GitBook
On this page
  • Add swatch filter from metafield
  • Add swatch filter from 'Color' option
  • Caveats of metafield filtering
  • A temporary fix for adjusting color swatch sizing

Was this helpful?

Edit on GitHub
  1. Collections

Variant filtering

Last updated 2 days ago

Was this helpful?

Your collection page filtering can be customized from the . Using this app you can add new filters and customize how they appear on your theme.

Shopify has recently made a number of improvements to metafields and how they work with swatches. This is great news for us because now swatches are much easier to manage and update.

Add swatch filter from metafield

1

Add swatch filter from metafield

  1. Go to Settings > Custom Data

  2. Scroll down to Metaobject definitions then click Add definition

  3. Add a name and description to your metaobject

    • You can use any name or description. E.g. "Swatch"

  4. Add three fields to your metaobject

    • Label, color and image.

    • Label should be a required field using "Single line text" - Make sure to select "List of values" after clicking single line text.

    • Color is not required and uses "Color".

    • Image is not required and uses "File" with "Accepts specific file types - Images" selected.

2

Create metafield to link to metaobject

We now have to assign values so data is populated for our new metafields.

  1. Go to Settings > Custom data

  2. Click Product

  3. Select Add definition

  4. Add a name and description to your new metafield.

    • You can use any name or description. E.g. "Swatch"

  5. Click Select type then pick Metaobject

  6. Choose List of values

  7. In the reference field enter the Metaobject you have just created

  8. Assign values to each product

  9. Hit Save

3

Link metafields to products

  1. Find a product you want to update

  2. Scroll down to Product metafields

  3. Add the colors you'd like to highlight for this product

4

Connect to filter

  1. Open the

  2. Navigate to Filters

  3. Click Add filter

  4. Click Select source, then look for the new product metafield you just created

  5. Add a label

    • You can use any name or description. E.g. "Color" or "Material"

  6. Click Save

Add swatch filter from 'Color' option

You can add filters using color product options. This is a easy way to add filters but will require swatch files to be uploaded in a specific format. Swatches will only appear using this approach when the product option matches "color" - or a translation of color.

  1. Open the

  2. Navigate to Filters and click Add filter

  3. Click Select source then look for the product option Color

This is the same approach you would take if you wanted to filter by any other product option like size.

  1. Add a label

    1. You can use any name or description. E.g. "Color"

  2. Hit Save

Caveats of metafield filtering

If you use metafield swatch filtering you'll have to ensure you update your metafields for all products that you want to appear on this filter - this will NOT happen automatically even if category metafields and variant options are displaying swatches.

A temporary fix for adjusting color swatch sizing

  1. Go to Online Store > Theme settings > Custom css

  2. Within your custom css block paste the following code: ​ ​For color swatches/custom swatches (adjust the REM within height and width in increments of .1 for the best results) :

    .btn.btn--plain {
      height: 2.2rem;
      width: 2.2rem;
    }

Upload missing swatch files

You may notice that not all of your color filters are appearing with swatches. If this is the case you may have to upload custom swatch files.

  1. Identify all swatches that are missing

  2. Upload a 64x64 jpg file for each swatch you want to replace.

    • Swatches must be named all lowercase and prepended with “swatch-”. For example, if your color variant is “Electric blue” you would name your file “swatch-electric-blue.jpg

Swatches will only appear automatically if the color name matches a default .

CSS color
Shopify Search and Discovery app
Search and discovery app
Search and discovery app