A space to discuss online store customization, theme development, and Liquid templating.
{% assign koskii_code = product.metafields.product.koskii_code %}
{% assign alternate_colors = products | where: "metafields.product.koskii_code", koskii_code %}
Colors:{% for product in alternate_colors %}- {{ render_tumbnail }} {% endfor %}
That's not something that is supported, so you seeing unexpected results would be a normal result.
Have you considered:
Hey Jason,
Thanks for your note.
I am not sure if I was clear in my earlier explanation, but the route we have taken is to define related products in a metafield. The name of the field is koskii_code and the value in that field is the same for all related products (products with the same color in this case). Hence trying to use that field to filter products. I was considering creating a collection with all products in shopify, and then from that collection use the metafield to filter the alternate colors for the current product in the product page.
For the other options you have suggested, here are some notes:
Thanks again for your quick response.