When I choose a collection in the collection list, it will show the collection picture, how to change it to the first product picture while not the collection picture.
Hi @yg
in order to show the first product photo in the collection list instead of the featured collection image, I invite you to follow these steps :
- From your Shopify dashboard, Click Online store > Actions > Edit code
- Open the file collection-grid-item
- Remove the below codes
{% if collection.image %} {%- assign collection_image = collection.image -%} {% elsif collection.products.first and collection.products.first.images != empty %} {%- assign collection_image = collection.products.first.featured_image -%}
- Replace them with
{% if collection.products.first and collection.products.first.images != empty %} {%- assign collection_image = collection.products.first.featured_image -%}
- Click Save
Let me know if you need any further assistance 🙂
Katrine
@plaktheme Thanks, it worked. But a new question came up, I found a shadow below the picture.
In order to remove the little grey shadow, add this code at the beginning on the collection-grid-item file
<style> .collection-grid-item__title-wrapper::before { height : 100% !important; } </style>
- Click Save
Let me know if you need any other assistance with this topic 🙂
Katrine
Welcome to the Shopify Forum Community provided by Plak ThemeLLC, a place where you can discuss about eCommerce and Shopify, solve technical issues, get help with Shopify Design, Apps integration, Marketing, Facebooks ad, Google ads and more.
Before posting, we invite you to read and follow the forum rules | We also support any questions related to Free Shopify themes :Dawn, Express, Minimal, Brooklyn, Narrative, Supply, Debut, Venture, Boundless and Simple