Discount Ninja
  • Discount Ninja Developer Hub
    • Storefront API
      • Promotion Engine
        • Enable
        • JavaScript API
          • Functions
          • Events
          • Objects
      • Widgets
        • Guiding principles
          • Accessibility
          • Localization
          • Integration
          • Style
        • Announcement Bar
        • Notification
        • Offer Rules Popup
        • Product Banner
        • Promotion Summary
        • Promotion Code Field
        • Promotional Badge
    • Integration
    • Theme edits
      • App blocks
        • Product Page Banner
        • Promo Code Field
        • Promotion Summary
      • Code edits
        • Product Detail Page (PDP)
          • Price
          • Banner
          • Badge
        • Product List Page (PLP) and Collections
          • Attributes
          • Price
            • Searchanise Search & Filter
            • Globo Smart Product Filter & Search (aka SPF)
            • AI Search & Product Filter (Ultimate Search)
            • Boost AI Search & Filter (aka PFS)
          • Badge
          • Pagination
          • Quick View
        • Cart
          • Root
          • Cart item
          • Promo Code Field
          • Promotion Summary
          • Subtotal
        • Gift With Purchase
Powered by GitBook
On this page
  • Registration
  • Style

Was this helpful?

  1. Discount Ninja Developer Hub
  2. Storefront API
  3. Widgets

Promotional Badge

The promotional badge is displayed on the image of a product card (typically in a collection or on a product page) to indicate which offer applies to the product.

This widget is currently available for V6 Beta customers only

Registration

App Embed

This widget is included in the "Discount Ninja" App Embed.

Placeholder

A placeholder for the badge must be added to the template of the collections where the badge should be displayed. The placeholder is typically added to the image part of a product card.

The following example shows where the placeholder would be placed given a product card with id example-product-card and an image part with id example-product-card-image:

<div id="example-product-card">
    <div id="example-product-card-image">
        <la-dn-product-banner-placeholder 
            product-handle="{{ product.handle }}">
        </la-dn-product-banner-placeholder>
    </div>
</div>

Note: the variable "product" in "product.handle" may be different in your theme.

Style

PreviousPromotion Code FieldNextIntegration

Last updated 1 year ago

Was this helpful?

Check out to learn more about how the style of this widget can be changed.

this article