Search by code and part number

Many tool buyers know the code printed on a product, not its name. Chisel lets shoppers search by code from the header search box, from the search results page and from the quick order page. This guide explains what the search matches, how an exact code is shown, and what you must set up so the codes are searchable.

What the search matches

The header search box and the search results page search these fields:

The search does not match the barcode of a variant. It also does not match the manufacturer part number in the Manufacturer part number metafield.

If a shopper types a part number that appears only in the metafield or the barcode, the search will not find the product. Put the part number in the variant SKU, as described in step 1 below.

Set up the codes

  1. In the Shopify admin, open a product.
  2. In the Variants section, enter the SKU for each variant. This is the code shoppers search for.
  3. If the manufacturer part number is different from the SKU, enter it in the product's Manufacturer part number metafield. The product page shows it as Part no. The search does not use it.
  4. Save the product.

Use the same code format for every product, such as 204-118 or 204118. Chisel ignores dashes and capital letters when it checks for an exact code match. Shoppers can type either format.

What the shopper sees

  1. The search box label reads "Search by name, code or part number". The placeholder reads "Name, code or part number".
  2. The shopper types a term. After a few letters, the header shows a list of suggestions. The list shows products, collections, articles and pages.
  3. When the suggested product's code matches the typed term, the list shows the code under the product name.
  4. Select the link at the end of the list, or press Enter, to open the search results page.

Use the Show search suggestions setting to turn suggestions on or off. Use Show vendor and Show price to add those details to each suggestion.

Search results page

  1. If the typed term exactly matches a variant SKU, the product appears first. It sits in an Exact code match row above the other results. Dashes and capital letters do not matter.
  2. The product does not appear again in the normal results list.
  3. The matched term is highlighted in the result titles.
  4. The search results page works without JavaScript. Typing a term and pressing Enter still shows the results.

Use the search with the quick order page

The quick order page takes codes directly. Shoppers paste a list of codes and quantities. See the quick order guide for the paste format.

Check your setup

  1. Open the storefront. Type the SKU of one product into the header search box.
  2. Confirm that the product appears in the suggestions.
  3. Press Enter. Confirm that the product appears under Exact code match.
  4. Type the code in a different letter case, with and without the dashes. Check whether the exact match still appears. The shopper's search must still return the product, so test both forms.
  5. Type the manufacturer part number for a product where the part number differs from the SKU. If the product does not appear, that is expected. Add the code to the SKU to make it searchable.

Settings used