Related Products

Please Note: This help doc relates to our Custom Theme Fields doc. Familiarize yourself with that first, before proceeding.

First create a hidden category for each set of related products. So if you had some product, you could create the "Related Something" category and be sure to uncheck the "Allow theme to display link?" checkbox in the category editor. This will ensure the category doesn't appear in your sidebar. You're going to put all the products you feel are related to that new category name, inside that category.

After creating this hidden category, look at what the URL slug of the category is. You can do this by going to the Modules > Categories section of your store's admin area, clicking edit across from your new hidden category and then clicking the view button on the top right. If the category was "Related Something", the URL may be something like - you want to take note of what's after "categories/", so "related-something" in this case.

Next, you would add a new custom text field in your product editor called "Related Category" and on each product you would paste in the category slug, such as "related-something". You'll use the value of this custom product field to load the category up in your theme and display the products in that category.

The last thing would be to edit your product.html template file. Here, you could do something like:
{% for p in store.category_by_slug[product.custom['related-category']].products %}
{% endfor %}

That would loop over all products in the hidden related category you specified in the product's custom field.