Hi all,
For my home page, I’m looking to create a featured collection of a single product, but with multiple variants (colors) showcasing, similar to the the demo theme Spotlight. Happy to input a script as long as it works fine and easiest to implement.
I’m on Dawn 15.3.0.
Website: https://cy88vi6zvskzmq20-58952089718.shopifypreview.com
Thank you so much!!!
Hello @sunday_april ,
There is a tutorial on Youtube on how to show variants as separate products on collection page using Dawn.
You can try and see if it works for your store.
Hi @sunday_april To display multiple variants (e.g., colours) of a single product as individual items in a Featured Collection-style layout on your Dawn 15.3.0 homepage—similar to the Spotlight demo theme—you’ll need a customise. Follow the steps –
-
Find the Product Handle
-
Create a Custom Liquid Section
Select Edit code in the theme option of the online store. Go to the sections and add a New Section and paste the code below-
{% assign product_handle = ‘classic-hoodie’ %}
{% assign featured_product = all_products[product_handle] %}
{% for variant in featured_product.variants %}
{% endfor %}
.featured-variants {
margin-top: 3rem;
gap: 2rem;
}
.card {
display: block;
text-align: center;
}
.card__media img {
width: 100%;
object-fit: cover;
}
- Add the Section to Your Homepage
Go to the Theme Customizer and select Custom Liquid in the Add Section and paste the below code-
{% section ‘featured-variants’ %}
Let me know if this works for you.