From products to even a single blog post. Simply select what you want to relate to, and during edition you can choose all available resources of a given type. In the template you will have access to the selected item so you can display anything you want! For example, if you relate to Product, you will have access to full liquid product object (more about product object: https://shopify.dev/docs/themes/liquid/reference/objects/product)

Use cases

You can use this field to, for example, simply setup and display cross sell products. On one product page you can then show other, selected products as recommendations etc. You can do the same on, for example, your blog post, or relate to whole collections!

Setup

Relate to - select which type of resource you want to relate to. It can be a product, variant, whole collection, page, blog or blog post.

Example Usage

Show the title of all related products, and link to them


{% assign relp = product.metafields.airf['relp'] %}

{% if relp and relp != blank %}

    {% assign separator = "###" %}

    {% assign relp_related_handles = relp | split: separator %}

    {% for handle in relp_related_handles %}

        

            {% assign related_product = all_products[handle] %}

            {% unless related_product.empty? %}

                <a href=”{{related_product.url}}”>

{{ related_product.title }}

</a>

            {% endunless %}

        

    {% endfor %}

{% endif %}