Learn how to add custom messages in Shopify add-to-cart using tags, templates, metafields, and fixed notes. Works on Dawn, Horizon & Origin themes.
If you’re running a Shopify store, you might have situations where you want to show custom messages to your customers whenever they add a product to the cart.
Examples include:
- “All sale items are final sale.”
- “Free shipping on orders above $50.”
- “No returns on discounted items.”
In this guide, you’ll learn four powerful methods to display custom cart messages in Shopify using Liquid code. These methods work with popular themes like Dawn, Origin, and Horizon.
Why Add Custom Messages to Shopify Cart?
Adding custom cart messages helps:
- Improve customer transparency
- Reduce refund & return requests
- Highlight important product details
- Personalize the shopping experience
Method 1: Add a Fixed Custom Message
If you want the same message for all products, this is the simplest method.
Steps:
- Open your Shopify theme editor.
- Search for the buy button file.
- In Dawn, find the
<form>
tag around line 57 (line 65 in Horizon). - Add the following code below it:
<input type= "hidden" value="all sale item are final sale" id="text" name="properties[note]"/>
Now, whenever any product is added to the cart, the fixed message will always show.
Method 2: Show Messages Based on Product Tags
Want the message to appear only on specific products? Use tags.
Code Snippet:
{% if product.tags contains "message" %}
<input type= "hidden" value="all sale item are final sale" id="text" name="properties[note]"/>
{% endif %}
👉 Add a message
tag to products in Shopify Admin, and only those products will display this note in the cart.
Method 3: Show Messages Using Product Templates
If you want cart messages to display based on templates, follow this method.
Steps:
- Create a new product template called message.
- Assign it to the desired product.
- Add this code in the template:
{% if template contains 'message' %}
<p class="cart-note">Template-specific message for this product.</p>
{% endif %}
Only products assigned to this template will show the message.
Method 4: Show Different Messages Using Metafields
For maximum flexibility, use Shopify metafields to create unique messages per product.
Steps:
- Go to Settings → Custom Data → Products.
- Create a metafield called Message.
- Add a value (example: “Special Offer – No Returns”) for each product.
- Insert this code in your theme file:
<input type= "hidden" value="{{ product.metafields.custom.message.value }}" id="text" name="properties[note]"/>
Now, every product can have its own personalized cart note.
Which Method Should You Choose?
- Fixed Message → Best for global notes (e.g., Final sale items).
- Tags → Great for showing notes only on selected products.
- Templates → Useful when designing template-specific notes.
- Metafields → Best option for product-specific and flexible messages.