Shopify themes, liquid, logos, and UX
Looking for help regarding adding product sku to my collection page, at present i can see my sku on each individual page but when i look on my collection page it only has the vendor product title and price. See image below. I am using venture theme can anyone help?
Solved! Go to the solution
This is an accepted solution.
Hi @KathyP
A SKU of the first available product variant can be added for Collection page by adding one line of code to the "product-card.liquid" snippet of your theme.
Here the code that have to be added:
<div class="product-sku">{{ product.first_available_variant.sku }}</div>
To show a SKU right at the top of a Product vendor, kindly add the code right before Vendor's code:
{% if settings.product_vendor_enable %} <div class="product-card__brand">{{ product.vendor }}</div> {% endif %}
So, the result would be next one:
<div class="product-sku">{{ product.first_available_variant.sku }}</div> {% if settings.product_vendor_enable %} <div class="product-card__brand">{{ product.vendor }}</div> {% endif %}
Here the screenshot for the reference: http://prntscr.com/sxl51f
This is an accepted solution.
Sure, to show SKU of the first product variant (no matter, does it available or sold out), instead {{ product.first_available_variant.sku }} code, just use {{ product.variants[0].sku }} code.
User | RANK |
---|---|
66 | |
61 | |
59 | |
48 | |
44 |
Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023