A user is building a product table using Metafields that displays collection items with custom data (rod specifications). The table currently adds products to cart but defaults to the first variant instead of opening the product page.
Initial Problem:
Table uses metafields to show product details (model, pieces, length, line rating, price)
“Buy” button adds default variant to cart rather than linking to product page
User needs products with many variants to open for selection instead
Solution Provided:
Replace cart functionality with anchor tag linking to /products/{{product.handle}}
Use double curly braces {{ }} for Liquid variable output
The handle is a built-in Shopify product property, not a custom metafield
Resolution:
Issue resolved after correcting syntax to {{product.handle}}. User confirmed the link now works properly. A reference to Shopify’s Liquid documentation basics was shared for further learning.
Summarized with AI on November 11.
AI used: claude-sonnet-4-5-20250929.
I’ve been using Metafields to create a table that pulls the info for different products in a collections. Right now this is setup to add that product to the cart. But gives you the Default product im assuming on the top of the array of products(or Objects… not sure what the right term is ha.)
Code for the table i frankensteined… you will see in the note on the code where I need help.. I think.
What is the path to just open the product. So instead of it adding to your cart it takes you to the product? These products have so many variants that I don’t know how to add code to where you could select varients and add to the cart.. Still very new to coding. That would be the end goal but for now a way to target the product vs adding to the cart.
So I think I see where this goes. I subbed out the code and it opens a link to a page that says not found. Do i need to add a “handle” metafield and give a handle to each of my products? Or is “handle” a built in term that it know what to do?
Again.. still pretty new to coding so it all a learning process for me. Thanks for the Reply and the help I really do appreciate it!