Custom Product – Recommended Product using Custom Product Metaied Definition (Liquid)

Topic summary

A custom product page for an online art gallery needs to display recommended products (other artworks) from the same artist. The gallery uses custom product metafield definitions to store artist names, and products are tagged with ‘Multiple Entries’ when an artist has multiple pieces.

Current Implementation:

  • Artist name stored as: product.metafields.custom.gallery_002_artist_name.value
  • Conditional tab appears when ‘Multiple Entries’ tag is present
  • Attempting to adapt code from product-recommendations.liquid

The Problem:
The product recommendation module isn’t populating results. The current Liquid code attempts to filter by product.vendor but needs to filter by the custom artist name metafield instead.

Suggested Solution:
One response recommends using metaobjects as a manual setup alternative that may not require custom code, with a tutorial reference provided.

Status: The issue remains unresolved with the original poster seeking help to properly implement artist-based product filtering using the custom metafield.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

We’ve created a custom product page, similar to the default, but we’ve added several custom product metafield definitions assigned to a specific category. The purpose of this collection is an online gallery that is up for a short time. We have some works of art from multiple artists, and we’d like to show users other works from the same artist on the product (very specific product recommendation).

Visual Reference: https://shop.visitcherokeenation.com/products/bejeweled

Near the bottom of the product page, we have an info section with tabs containing details about the product as well as a tab specifically showing other works that the particular product artist has in the show. For example:

Product Page – Art Show 2025, Artwork 1, John Doe

Product page contents

More from the Artist (Product Recommendation Module)

Art Show 2025, Artwork 2, John Doe

Art Show 2025, Artwork 3, John Doe

Conditionally, if an artist has more than one piece, we’ve assigned a specific tag which call up the ‘Other Works’ tab if it’s been assigned (working great). The artist’s name is a product metafield definition assigned to the correct category. For the recommended product section, below is the code I’m using to try and call only other products with the same metafield definition as the current selected product:

{%- unless template == ‘index’ or template == ‘cart’ or template == ‘list-collections’ or template == ‘404’ -%}
{%- assign t = template | split: ‘.’ | first -%}
{% assign related_products = product.metafields.custom.gallery_002_artist_name.value %}
{% assign limit = 3 %}

{% if product.vendor == product.vendor %}
{% if product.tags contains ‘Multiple Entries’ %}

{%- include ‘gallery-product-card’, product: product, collection: collection -%}

{%- endif -%}
{%- endif -%}

{%- endunless -%}

Additional Info that may help:

Product Name: product.name

Product Vendor: product.vendor

Artist Name: product.metafields.custom.gallery_002_artist_name.value

I’ve attempted to copy and paste directly from product-recommendations.liquid to start the setup but event the results aren’t populating.

Any help is appreciated!

Hey @KaitlynAbbott will definitely recommend you to watch this tutorial on metaobjects. The guy uses kind of the same example here to explain this as your requirement is.

There are definitely other alternatives but this is more a manual setups where you might probably not need code.

Hope this helps. In case you need help anyways, please reach out via personal links below for a convenient conversation and collaboration.

Best

Shadab