Goal: Insert an extra product detail (e.g., “12 pack”) between product name and price in the Refresh theme’s product cards, initially in the homepage Featured Collection.
Implemented solutions:
Sitewide or homepage-only: Add markup after the product title in card-product.liquid (after under the heading block found via “card__heading{% if card_product.featured_media or settings.card_style == ‘standard’ %} h5{% endif %}”). Use a simple text node for all pages, or wrap with {% if template == ‘index’ %} for homepage only.
Collection-specific: Update card-product.liquid to check card_product.collections for collection.handle == ‘bebidas’; if true, render “12 pack cans”. This targets only products in the “bebidas” collection across all product cards.
Styling/spacing: Add CSS in base.css targeting #additional_info to adjust margin, font size, and line height.
Follow-up and guidance:
Exact insertion point re-clarified: paste the conditional block immediately after the title’s closing .
Current issue (unresolved):
On the custom page “copy-of-sobre-matu-mate” (section “nuestras bebidas”), the font size for the added info does not apply, while it appears correctly on other pages. Preview links and screenshots were provided; cause not yet identified. Discussion remains open.
Summarized with AI on December 18.
AI used: gpt-5.
Then paste the below code at the next line of “” like below attached image and then save changes.
If you want to display the additional information in all pages, use code the provided in Solution 1. If you want to display only on the home page, use code the provided in Solution 2. Solution 1: To display “12 pack” additional information in product cards in all the pages.
@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
@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 %}
12 pack cans
{% endif %}
{% endif %}
To adjust the spacing, go to ‘base.css’ file and paste the below code in bottom of the file and save changes. Note: You can adjust the spacing as per your need. You can also add font size if you want to adjust the font size.
@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.