A user wants to display product size variants on their Shopify homepage’s featured collection section, alongside product name and price. Each product has only one size option.
Proposed Solutions:
Code modification: One responder suggested editing the featured-collection.liquid file and using {{ product.variants.first.options[0] }} to display the size.
Simple workaround: Adding the size directly to product titles using Shopify’s bulk editor or CSV import/export.
Technical guidance: The user is working in card-product.liquid but getting “0” instead of the actual size. They’ve confirmed size variants are set up in the product backend but may not be properly connected to the frontend. A responder recommended using variant.options.first or consulting Shopify’s Liquid documentation for variant and product_option objects.
App-based solution: Using the Easify Product Options app was suggested as a no-code alternative that can display size options as dropdowns, buttons, or radio buttons on homepage and collection pages.
Status: The issue remains unresolved as the user continues troubleshooting the code implementation. Screenshots show the current “0” output and backend variant setup.
Summarized with AI on October 27.
AI used: claude-sonnet-4-5-20250929.
How would I be able to display the size variant within the featured collection homepage? Right now, it displays the name and pricing but I would like to add a third variant. I only have one size, not a collection on sizes. How or what code would I need to change? Thanks!
To display the size variant in the featured collection on your homepage, follow these steps:
Locate the featured collection section: Go to Online Store > Themes > Actions > Edit Code and find the relevant template (e.g., featured-collection.liquid).
Add the size variant: Inside the product loop, add this code to show the size:{% for product in collection.products %}
{{ product.title }}
{{ product.price | money }}
Size: {{ product.variants.first.options[0] }}
{% endfor %}
Save & Test: Save your changes and preview your homepage. The size should now appear with the product name and price.
The simplest solution is to just put the size in the product name when there is only one size for products.
Use the bulk editor, or product CSV export/import to do it fast.
Otherwise a theme customization is needed and some styling which can vary wildly by theme which you omitted.
If you need this customization then contact me by my email for services
Or if you have access use a private message by clicking here (sloooower). Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
I’m working in card-product.liquid and pulling variables. However, I’m not sure which variable to use to correctly pull the size. Right now, it shows as “0,” which isn’t accurate.
I’ve already added the sizing variant in the product setup, but I’m not sure if it’s properly connected from the backend to the frontend. If this isn’t possible to fix, I could add the size to the product title as a workaround, but I’d prefer not to.
The quantity breaks has nothing to do with the stated goal.
If using chatgpt etc avoid doing that they spit out nonsense that just complicates things if you don’t already know what your doing.
Either go through the variants options or other properties on the variant object your getting through the select_or_first_available_variant product property.
e.g variant.options.first
See the liquid docs for that property and others, or the product option object to not even go into the variants.
Looks like you’re trying to show a size option right on your featured collection section. I’d recommend giving Easify Product Options a try — it’s super easy to set up and doesn’t require any code. Definitely a simple way to get what you need working smoothly. Here’s how it works:
This app is very beginner-friendly, I hope you will try it. If you need any further assistance setting this up, please let me know or reach out to Easify!