All things Shopify and commerce
I would like to show size variants (and what sizes are sold out) on collection pages, featured collections in my store. For example if a customer viewed to "TOPS" or "NEW ARRIVALS" they could easily see what sizes are offered and what sizes are available/sold out without having to click into view each item. According to the app developers I can only show size variants on these pages if I enable color swatches on and hover with the mouse over the color swatches (then the sizes show up also?). I'm not interested in adding color swatches and most customers are mobile so will not have a mouse to hover.
LINK TO MY STORE: https://theroveboutique.com/
Thanks in advance!
Solved! Go to the solution
This is an accepted solution.
Hello @nicolemn ,
It's possible but not without the customization.
This is an accepted solution.
Hello @nicolemn ,
It's possible but not without the customization.
It sounds like the app developers you've spoken with have suggested that the only way to show size variants on collection pages is by enabling color swatches and hovering over them with a mouse. However, there are a few other options you can consider:
Use a different app: There are many apps available on the Shopify App Store that allow you to display size variants on collection pages without having to use color swatches. You can try searching for "size swatches" or "size variants" to find some options.
Use a custom solution: You can hire a Shopify developer to create a custom solution that displays size variants on collection pages without using color swatches. This can be a bit more expensive, but it can also allow you to have more control over the final design and functionality.
Use a third party plugin: Look for a third party plugin that can be added to your Shopify store and allows you to show size variants on the collection pages.
Show the sizes and stock on the product card: You can show the available sizes and stock status on the product card on the collection page itself so that customer can quickly see what is available without having to open the product page.
Show the stock status next to the size on the product page: you can show the stock status next to the size options on the product page, so the customer can see which sizes are sold out.
In any case, it is important to note that the best solution will depend on the specific needs of your store and your customers.
Is it possible to add Size Swatches in the Collection Page below the prices?
Hello @nicolemn ,
We are OneExperts from OneCommerce and we're here to support you.
Apart from your app developers suggestion, you may want to try edit the code if you comfortable with it and you can follow these steps:
<p>{{ product.options[0] }}: {{ product.variants[0].option1 }}</p>
Hope we can help you with this. Please hit the Like Button or mark this as Accepted Solution if you think our answer is helpful, it means a lot to us.
Best regards,
OneCommerce team.
Get know us at: Website | Blog | FAQ | Contact us
Can you please guide us on where do we paste these codes to get the attached results? We want to show Size Swatches in the Collection/Product Pages.
Unable to find that n Dawn theme
Put this script in header
<script>
function addItemToCart(variant_id) {
data = {
"id": variant_id,
"quantity": 1
}
jQuery.ajax({
type: 'POST',
url: '/cart/add.js',
data: data,
dataType: 'json',
success: function() {
window.location.href = '/cart';
//alert('added');
}
});
}
</script>
Add this code in product-cart or grid-item or may be other name
<span class="add-to-cart-button" style="display:block; margin-top:5px">
{% unless card_product.has_only_default_variant %}
{% for option in card_product.options_with_values %}
{% assign downcased_option = option.name | downcase %}
{% if downcased_option contains 'size' %}
<div>{{ option.name }} </div>
{% assign is_size = true %}
{% for value in option.values %}
{% assign variant_avialable = true %}
{% if card_product.options.size == 1 %}
{% unless card_product.variants[forloop.index0].available %}
{% assign variant_avialable = false %}
{% endunless %}
{% endif %}
<span onclick="addItemToCart({{ card_product.variants[forloop.index0].id }})" data-variantid="{{ card_product.variants[forloop.index0].id }}" data-variantsku="{{ card_product.variants[forloop.index0].sku }}" class="add-to-cart-button size-values {% unless variant_avialable %}soldout{% endunless %} text-center">{{ value | escape }}</span>
{% endfor %}
{% endif %}
{% endfor %}
{% endunless %}
</span>
Can you please guide us on where do we paste these codes to get the attached results? We want to show Size Swatches in the Collection/Product Pages.
Bump for this!
Which page does the code need adding too specifically? and where on the page page should it be placed exactly please?
This video shows a neat way to display every variant and price of products on your Shopify collection pages.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey 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, 2024