Zid Docs
Merchant APIApp APIThemes
Merchant APIApp APIThemes
Help Center
Slack
  1. Products
  • 🚨 Important Update: Zid Themes
  • Landing Page Development
  • Getting Started with Zid Themes
    • Introduction to Theme Development
    • Manage your Themes
    • Building Themes in Zid
    • Theme File Structure
    • Twig Syntax and Features
    • Zid Theme Packager
  • Templates
    • Layout
    • Home Page
    • Products
    • Cart
    • Store Language and Currency
  • Settings Schema
    • Text
    • Number
    • Text-Area
    • Select
    • Radio Buttons
    • Checkbox
    • Range
    • Color
    • Image
    • Product
    • Category
    • List
    • Fieldset
  • Code Snippets
    • Apple Pay Quick Checkout
    • Custom CSS Injection
    • Displaying the Store's Business Center Logo
    • Customizing Copyright Text
    • Store's Main Navigation Menu
    • Customer Wishlist
    • Products
      • Products Badges
      • Product Ratings
      • Remaining Product Stock
      • Sold Items Count
      • Product Filtration by Attributes
      • Grouped Products
      • Product Questions & Answers
      • Product Restock Notfication
    • SEO
      • Images alt text
      • Themes SEO Marketing Tags
    • Marketing
      • Metafields
      • Gift Feature
      • Loyalty Program
  • Zid Themes Library: API Integration
    • Products
    • Product Categories
    • Cart
    • Blog
    • Customer
    • Store Settings
  • Data Reference
    • Locals
    • Store
    • Cart
    • Product
    • Products List
    • Category
    • Categories List
    • Session
    • FAQs
    • Customer
    • Blogs
    • Page
    • Main Menu
    • Main Navigation Menu
    • Request
    • Orders
    • Addresses
    • Store Payment Methods
    • Store Shipping Methods
    • Store Banks
    • Asset URL
    • Header Meta Tags
    • Loyalty pogram Wallet
  • Themes CLI
    • CLI Authentication
    • Theme Create
    • Theme Package
    • Theme Update
    • Themes List
    • Theme Preview
  1. Products

Products Badges

Product Badges help merchants attract customer attention by adding visual cues to highlight special offers or product features. Integrating this feature into your themes is crucial to ensure better product visibility and engagement.

Product Badge Activation Steps for Merchants#

Product Badge.png
1.
Go to the Products page in Zid's merchant dashboard.
2.
Create a new product or edit an existing one.
3.
Navigate to the side section > Product Image Label.
4.
Select a badge from the drop-down or create a custom badge to attach to the product.
Once applied, these badges will appear on the store’s product pages, drawing customer attention and encouraging more engagement.

Code Snippet Integration for Theme Partners#

To properly integrate Product Badges into the theme, you’ll need to add two key templates into the appropriate theme files:

1. Products Template#

This code is preferably placed above the product name for optimal placement
Insert the following in the product.twig file:
{% if product.badge %}
    {{ template_for_product_badge }}
{% endif %}
This code snippet verifies whether a product has an assigned badge. If a badge is present, it loads the template_for_product_badge template to manage its display.

2. Product Card Template#

This code is preferably placed above the product image for optimal placement
Insert the following in the common/product-card.twig file:
{% if product.badge %}
    {% include 'template_for_products_badge' ignore missing %}
{% endif %}

<div class="product-img-container" style="width: 100%; height: 100%;">
    <div class="product__img-wrap {% if product.images[1] %}multiple-imgs{% else %}single-img{% endif %}">
    .
    .
    .
This code snippet displays the Product Badge within the product card template, which appears in the product list. It works similarly to the product page logic, loading the badge template if the product has a badge assigned.
Modified at 2025-01-06 17:17:31
Previous
Customer Wishlist
Next
Product Ratings
Built with