hey y’all! I am trying to add liquid code for adding a sale messaging under my products on collection page like “use code” messaging in the screenshot attached. Can someone help?
Topic summary
Main issue: Add a promotional “use code” sale message beneath each product in the collection page using Shopify’s Liquid templates. A screenshot is referenced, indicating placement under product cards.
Proposed approach: Use product-specific metafields to store the message/code and output them in the collection grid template via Liquid. Metafields are custom data fields attached to resources (e.g., products) that can be rendered in theme code.
Resources shared:
- Shopify documentation on creating and using metafields for products.
- A YouTube tutorial link showing how to implement similar messaging under product listings.
Key steps implied: Define a metafield namespace/key for the sale message on each product, populate values, then update the collection item snippet to render the metafield value conditionally (only when set).
Status: No finalized code or confirmed implementation provided in the thread. The discussion remains open, with practical guidance and references offered but no verified outcome yet.
Notes: The attached image and video are central to understanding desired placement and implementation guidance.
Hi, about your issue, you can use metafields data for each products, and call them in code.
You can referent docs here:
