I am looking to add the text ‘more colours available’ or ‘more styles available’ underneath the relevant individual products on their collection pages - any products that have colour or style variants. I have read some threads on this and have tried the recommendations in terms of adding some code but to no avail. Any help would be greatly appreciated.
For example on the following page: https://www.mutterlyfabulous.co.uk/collections/collars I have these products available in a number of colour variants so I would like some text to show this under each of the products on the collection page.
Yes - exactly this! What section of the code should I be looking at for this file? I cannot find a ‘product-card.liquid’ file but under Templates I have a ‘product.collars.json’ file?
I have had a look in the Snippets folder and there is a ‘card-product.liquid’ file. Could this be relevant? Other than that, the only ‘product’ related files are ‘product-media.liquid’ and ‘product-thumbnail.liquid’
@LitExtension Would you be able to help us with this same issue? We’re hoping to add “More Colors Available” under the products with more than one color variant. Would really appreciate your help! Thank you!
{%- if card_product and card_product != empty -%}
{%- liquid
assign ratio = 1
if card_product.featured_media and media_aspect_ratio == ‘portrait’
assign ratio = 0.8
elsif card_product.featured_media and media_aspect_ratio == ‘adapt’
assign ratio = card_product.featured_media.aspect_ratio
endif
if ratio == 0 or ratio == nil
assign ratio = 1
endif
-%}
It’s worked! Amazing, thank you so much. I just changed the text to say ‘more colours available’ as this is the variant on the product we spoke about.
I also have another collection page whereby we have a number of ‘style’ variant options available, so would like to add similar on the collection page to notify customers that there are ‘more styles available’. I have copied a link to the page below:
{%- paginate collection.products by section.settings.products_per_page -%}
{% comment %} Sort is the first tabbable element when filter type is vertical {% endcomment %}
{%- if section.settings.enable_sorting and section.settings.filter_type == 'vertical' -%}