Shopify themes, liquid, logos, and UX
Hi there!
I would like to add the product size on the collection page.
I would like the product size to be show on the collection page.
I would like to see it displayed after the title of the product.
There would be a comma after it, for example:
"Zara Women's Black Boots, size 39".
I only have one size per product, and it is stored under Variant.
Example below:
Here is the link and password:
pw: mewnaw
Thank you!
Hi,
To do that you need knowledge of code to customize.
First, you need to go to snippets/card-product.liquid, then find line 118 and replace the code here with the code below:
{%- assing variant_name = "" -%}
{% for variant in product.variants %}
{%- assing variant_name = variant.title -%}
{% endfor %}
{% if variant_name != "" %}
{{ card_product.title | escape }} - {{ variant_name }}
{% else %}
{{ card_product.title | escape }}
{% endif %}
If you don't implement yourself, you can ask to developer help you do that.
Cool I will try this!
Here is line 118. Could you let me know where exactly I should paste your code? Thanks Joseph!
ok i see, so you need to replace the code in red box with new code bellow.
{%- assing variant_name = "" -%}
{% for variant in card_product.variants %}
{%- assing variant_name = variant.title -%}
{% endfor %}
{% if variant_name != "" %}
{{ card_product.title | escape }} - {{ variant_name }}
{% else %}
{{ card_product.title | escape }}
{% endif %}
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024