How can I display custom text in the mini cart based on product details?

Topic summary

A user seeks help displaying custom text in their mini cart that currently appears only in the main cart. The custom messages are triggered by specific product title text or vendor names.

Current Implementation:

  • Custom text shows in main cart based on conditions:
    • “PRE ORDER” in product title → displays purple text about accepting pre-orders with release date shipping info
    • Vendor equals “Warehouse” → displays blue text about special orders requiring 2-4 weeks delivery

Goal:
Transfer this conditional text logic to the mini cart display.

Code Provided:
The user shared their header cart toggle code, which includes references to the mini-cart render and cart drawer functionality.

Status:
Another user has responded asking for the mini cart liquid code to provide assistance. The discussion remains open, awaiting additional code details to formulate a solution.

Summarized with AI on November 24. AI used: claude-sonnet-4-5-20250929.

Hi There,

I am looking for some help with my Mini Cart - I have custom text in the main cart, which is driven by specific title text or vendor name, and I would like this to show in the mini cart?

Current Code is;

{%- render 'icon', icon: 'cart' -%} {{ cart.item_count }}

{%- render ‘icon’, icon: ‘close’ -%}

{{ ‘header.general.cart’ | t }}

{%- if settings.cart_type == 'drawer' and template != 'cart' -%} {%- render 'mini-cart' -%} {%- endif -%}

I need to add;

{%- if product.vendor == “Warehouse” -%}

Available for SPECIAL ORDER - Please allow 2-4 weeks for delivery.

{%- else -%}

{%- if product.title contains “PRE ORDER” -%}

Accepting PRE ORDERS - Items will ship on or around the release date.

What is your mini-cart.liquid code?