creative designer

The Shopify API doesn't provide a simple way to search for products with a certain SKU code. With some alternate templates and the storefront search let's look at a simple way to add a JSON endpoint for SKU searches.

This has been added to the Shopify code snippets repo under Search by SKU.

Example

Jump to the experiments store to see this code in action. To see just the default search results without being JSON formatted follow this link instead.

The code

The alternate template search.sku.liquid is shown below.

grabbing the code...

Once setup, you'd query your new custom endpoint instead of the standard API. 

Like to work with me?

Let's talk