Cosmero docsPre-release

Collection and search

8 min read

Collection pages and the search page show products as the same product cards, and the collections list shows a card for each collection. This page covers the sections on those templates, and how filters, sorting and search suggestions work. How product cards look is set once for the whole store, in Theme settings under Product cards.

Online Store → Themes → Customize

  1. From your Shopify admin, go to Online Store → Themes, then select Customize on Cosmero.
  2. Open the drop-down menu at the top of the theme editor (it starts on Home page) and choose the template: a collection, the collections list or search.
  3. Select the section in the sidebar to change its settings.
  4. Select Save.

The collection template has two sections:

  • Collection banner: the collection’s title, description and image. See Collection banner.
  • Product grid: the pills, the filters, sorting and the products.

A collection without products shows “This collection is empty”, with a “Continue shopping” button that leads to all your products. When the chosen filters match no products, the grid says “No products match these filters”, with a button that clears them.

Pills are a row of links above the products, for moving between categories. On phones they scroll sideways.

  • Pill source: Menu or Filter.
  • Menu: shows the menu’s links as pills and highlights the link to the current page. Shown when Pill source is Menu. No pills show until you choose a menu.
  • Filter: Product type, Vendor or Tag. Shows the filter’s values as pills, with “All” first, and leaves that filter out of the filter list. Customers pick one value at a time, and the other filters keep working with it. Values with no products in the collection are left out. Turn the filter on in the Search & Discovery app. Shown when Pill source is Filter.
  • Enable filtering: shows the filters you set up in the Search & Discovery app.
  • Desktop filter layout: Horizontal bar shows each filter as a drop-down above the products. Sidebar lists the filters in a column beside the products, and the column stays in view as customers scroll. On mobile, filters open in a drawer. Shown when Enable filtering is on.
  • Enable sorting: shows a “Sort by” menu.
  • Show product count: shows the number of products.
  • Products per page: from 8 to 48 (24 by default).
  • Columns on desktop: from 2 to 5 (4 by default). Tablets show up to 3.
  • Columns on mobile: 1 column or 2 columns.
  • Pagination: Load more button or Page numbers. With Load more button, a line counts the products shown so far, and a “Load more products” button adds the next page below them. Customers who land on a later page also get a “Show previous products” button.
  • Color scheme: the colors of the panel.
  • Panel style: Panel or Flush. Flush panels span the full page width with square corners. Flush is the default here, so the product cards sit on the page itself.
  • Enable full width on mobile: on phones, the panel spans the full screen width with square corners. Shown when Panel style is Panel.
  • Top padding and Bottom padding: the space above and below the products, from 0 to 120 px.
  1. In your Shopify admin, go to Content → Menus and create a menu for the pills, such as one with your Hair, Skin and Body collections.
  2. Select Add menu item for each collection, then select Save menu.
  3. In the theme editor, open a collection page and select Product grid.
  4. Set Pill source to Menu, choose your menu under Menu, then select Save.

The pills are the same on every collection that uses the template, and each collection page highlights its own pill.

Cosmero uses Shopify’s own storefront filtering, on collection pages and on the search page. You choose the filters in the Search & Discovery app, such as availability, price, product type or a product option like Size, and the theme shows the ones Shopify returns for each page. There’s nothing else to set up in the theme.

  1. In your Shopify admin, open the Search & Discovery app and add the filters you want customers to use.
  2. In the theme editor, open a collection page, select Product grid and check that Enable filtering is on.
  3. Open the search page and check the same setting in Search results.

How customers use them:

  • Each value shows how many products match. Values that match no products can’t be selected. A filter with many values shows the first 8, with a “Show more” button for the rest.
  • Values that Shopify shows as swatches or images, such as colors, show them beside their names.
  • The price filter has “From” and “To” fields and a slider with two handles.
  • Chosen filters show as pills above the products. Customers remove one by selecting its pill, or all of them with “Clear all”.
  • The products update as soon as a filter or the sort order changes, without reloading the page, and the page’s URL keeps the choice.
  • On phones and tablets, a “Filter” button opens the filters in a drawer and shows how many are active. The drawer’s button shows how many products match.

The “Sort by” menu lists Shopify’s sort options, such as best selling or price. A collection opens in the sort order you set for it in the Shopify admin.

The collections list page, at /collections on your store, shows your collections as cards. Its template has one section, Collections grid. Each card shows the collection’s image, or its first product’s image when the collection has none, on the Image background color from the Product cards theme settings. The whole card is a link.

  • Heading: “Collections” by default. Leave it empty to hide it.
  • Collections per page: from 8 to 48 (24 by default). The rest go on more pages, with page numbers.
  • Columns on desktop: from 2 to 5 (4 by default). Tablets show up to 3.
  • Columns on mobile: 1 column or 2 columns.
  • Image ratio: Adapt to media, Square or Portrait.
  • Show product count: shows the number of products in each collection.
  • Color scheme: the colors of the panel.
  • Panel style: Panel or Flush (the default here). Flush panels span the full page width with square corners.
  • Enable full width on mobile: on phones, the panel spans the full screen width with square corners. Shown when Panel style is Panel.
  • Top padding and Bottom padding: the space above and below the collections, from 0 to 120 px.

The search page shows everything that matches a search. Its template has one section, Search results. It starts with a search field and, after a search, shows:

  • pills for the kind of result: “All”, “Products”, “Pages” and “Articles”;
  • the number of results, the filters and the “Sort by” menu;
  • products as product cards, then pages and articles in a list under “Pages and articles”;
  • when nothing matches, “No results for” and the search terms, with a tip to check the spelling.

Filters show only when the results include products, so they’re hidden when a customer picks “Pages” or “Articles”.

  • Enable filtering: shows the filters you set up in the Search & Discovery app.
  • Desktop filter layout: Horizontal bar or Sidebar. On mobile, filters open in a drawer. Shown when Enable filtering is on.
  • Enable sorting: shows a “Sort by” menu.
  • Results per page: from 8 to 48 (24 by default).
  • Columns on desktop: from 2 to 5 (4 by default). Tablets show up to 3.
  • Columns on mobile: 1 column or 2 columns.
  • Pagination: Load more button or Page numbers (the default here).
  • Color scheme: the colors of the panel.
  • Panel style: Panel or Flush (the default here). Flush panels span the full page width with square corners.
  • Enable full width on mobile: on phones, the panel spans the full screen width with square corners. Shown when Panel style is Panel.
  • Top padding and Bottom padding: the space above and below the results, from 0 to 120 px.

Customers open search from the header: the “Search” button on desktop, the search icon on phones. Search opens in a panel at the side of the page.

With Enable search suggestions on, suggestions appear as customers type, from the second character:

  • suggested searches, products, collections, pages and articles, up to 4 of each;
  • each product with its image and title, its price when Show product prices is on, and “Sold out” when it is (sold-out products come last);
  • “Search for” the typed words at the end, which opens the search page with every result.

Before customers type, the panel can show suggested search terms, links from a menu and products from a collection. When a search finds nothing, the panel says so, links to all your products and shows those suggestions again.

The suggestions come from a section named Predictive search. It has no settings and isn’t on any template: everything you can change is in theme settings, under Search.

Online Store → Themes → Customize → Theme settings → Search

  • Enable search suggestions: shows suggestions as customers type. When it’s off, the panel is a plain search form, and suggested terms link to the search page.
  • Show product prices: shows prices next to the products in the panel.

Under Before customers type:

  • Suggested search terms: separate terms with commas. Shows up to 8; selecting one searches for it.
  • Suggested links: shows the menu’s top-level links under the suggested terms.
  • Featured collection: shows up to 6 products from the collection.

With Suggested search terms, Suggested links and Featured collection all empty, the panel shows only the search field until customers type. The search panel and the filter drawer use Drawer color scheme, under Colors in Theme settings.

  • When you show a filter as pills, it leaves the filter list, so customers don’t see it twice.
  • Use Suggested search terms for what customers look for most, such as a skin concern or a product type. Selecting a term searches for it at once.

Still stuck? We answer.

Contact support