Shopify themes, liquid, logos, and UX
Hello Community 🙂
we are using the refresh theme and on the homepage we have added the section: featured collection
how can we add per default additional product info (12 pack) between product name and price? something like this:
this is the preview link: https://fo68e6svg3jpprqu-61049766108.shopifypreview.com
many thanks
@PhMA Please follow below steps to add additional info like 12 pack in product cards. Let me know whether it is helpful for you.
<p>12 pack</p>
{% if template == 'index' %}
<p>12 pack</p>
{% endif %}
@Vinsinfo many thanks for your help, but how can I apply it everywhere on the product cards but only the products that are part of the bebidas collection, other product cards from other products should not have this info
so on all the product cards that are part of this collection only: https://matumate.com/collections/bebidas
@Vinsinfo also how can we make the spacing between the name - 12 pack - price -> a bit less? have a bit more narrow
@PhMA To display the info only for "bebidas" collection products. Remove the previously shared code and use below code instead of it in the 'card_product.liquid file'.
{% if card_product.collections %}
{% assign is_bebidas_collection_product = false %}
{% for collection in card_product.collections %}
{% if collection.handle == 'bebidas' %}
{% assign is_bebidas_collection_product = true %}
{% break %}
{% endif %}
{% endfor %}
{% if is_bebidas_collection_product %}
<p id='additional_info'>12 pack cans</p>
{% endif %}
{% endif %}
.card__information #additional_info {
margin: 8px 0px 0px;
font-size: 16px;
line-height: 20px;
}
@Vinsinfo where after which section, code line in card product liquid do I need to add this?
@PhMA In the same line as we mentioned in the very first comment. We will share the steps again her below, you can also follow it. Let me know whether it is helpful for you. If still it didn't works, please share the card-product.liquid file.
{% if card_product.collections %}
{% assign is_bebidas_collection_product = false %}
{% for collection in card_product.collections %}
{% if collection.handle == 'bebidas' %}
{% assign is_bebidas_collection_product = true %}
{% break %}
{% endif %}
{% endfor %}
{% if is_bebidas_collection_product %}
<p id='additional_info'>12 pack cans</p>
{% endif %}
{% endif %}
.card__information #additional_info {
margin: 8px 0px 0px;
font-size: 16px;
line-height: 20px;
}
@Vinsinfo many thanks, I was able to apply it but on this page
copy-of-sobre-matu-mate nuestras bebidas -> there the font size is not adjusting, although it is again linking to the same collections
https://k5dxgyj7e7p6x5ov-61049766108.shopifypreview.com
on all other pages it has the smaller font size like this (it should be like this):
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025