6 months ago
Display product Size/variants in each product This post is outdated
Hi,
I've spent two hours now trying to search for how to display, for now, the product Size for each product, even when there's just one size. We would like to display that to the customer, though there will only be one size for the products.
The latest post I read was this one:
But Im not getting anywhere.
Store:
www.nissefabrikken.no
Product example:
http://www.nissefabrikken.no/products/filtnisse-222
Help?...
Thanks,
Johnny
Webdesigner
www.motion-effect.no
Posts:
I'm not sure what you mean, but this may help:
http://wiki.shopify.com/Product_img_url#Image_sizes
Posts:
Hey,
Thanks, nice tip. But it's not really what Im looking for. I need to show the product Size (hight actually) in singel product display. (product.liquid), even if there is just one variant of the hight.
Posts:
I'm getting whippet about getting this done. And I know some people have been working on this issue before.
Anyone able to lead me on to a solution?
<3
Posts:
I'm still not 100% on what you're after, but I'll offer some solutions to what I think you're attempting. Is there a reason you can't just cycle through the product's variants and output all variants? This will output a drop down even if there's only one height option.
{% for variant in product.variants %} ... {% endfor %}You could use Metafields to add extra attributes to your product and output that. But I'd say that's overkill.
You could use the 'split' function and include the height for every product in their description.
Posts:
Hey Tapwell,
Thanks for giving it a try with me :)
Well, I'm not that good into coding, but I can try. It would maybe be so that I can also loop that, specifically for one variant? Like this:
{% for variant in product.variants.size %} ... {% endfor %}I did also refer to a link when I added this post, to show more in detail what I mean. Did that help?
Thanks,
Posts:
Bumbing this one,
Why doesnt Shopify show the size of a product, even if there is just one size on the current product?
Posts:
Damn, seems like I finally figured this one out.
I changed not only this line in product.liquid:
{% if product.variants.size > 1 %}To this:
{% if product.variants.size > 0 %}But the same line further down, just before the Javascript opens.
Close.
Posts:
Thanks, this helped me too :-)
Posts:
That's good. Finally I could help someone :)
Happy newyear'n all that.