Hi! I’m trying to get the size of each product to show up in the product card so that it’s visible from outside the product page. The store I’m working on right now only has one size for everything so it’s important information (on the level of, e.g., price) that I would want the customer to know before clicking through.
Right now for the product pages I have the variant picker for size in order to display the size, and will use CSS to disable the button and style it as if its plain text. This isn’t an ideal solution so if anyone has any suggestions on how to get the size of the product to appear as text on the page without creating a metafield and manually inputting the size for each product, I’m all ears.
What I’m more interested in though, is finding a way to get the size/variant picker to appear on the collection page. According to product-variant-picker.liquid, this should make it possible to use it:
{% render 'product-variant-picker',
product: product,
block: block,
product_form_id: product_form_id,
update_url: false
%}
But when I put that into card-product.liquid like so:
...
<div class="card-information">
{% render 'product-variant-picker',
product: product,
block: block,
product_form_id: product_form_id,
update_url: false
%}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
...
Nothing appears. If I change “product: product” to “product: card_product” (as seen in the price block), it produces empty drop-down menus like so:
The fields do correspond to the product pages they came from, but why isn’t the information rendering? And how can I get it to appear as “Pills”? Or am I going about this the wrong way and there’s another way to get this to appear as plain text?
Thank you for your help! Happy to provide more info as needed.
