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
  • Definition
  • QuickView section
  • Product and variant
  • Price section
  • Example

Was this helpful?

  1. Discount Ninja Developer Hub
  2. Theme edits
  3. Code edits
  4. Product List Page (PLP) and Collections

Quick View

Definition

A Quick View is a popup that provides a form to add a product variant to the cart. It is usually accessible from a PLP or the home page.

QuickView section

Mark the Quick View section with a data-la-dn-quickview attribute.

Product and variant

Mark the section that renders the product with a data-la-dn-product-handle attribute to indicate the product it displays. Also, add the data-la-dn-product-variant attribute to indicate which variant is displayed. When a different variant is selected, this attribute must be updated.

Example:

data-la-dn-product-handle="my-product" data-la-dn-product-variant="123456" data-la-dn-product-dynamic

Price section

Use the following snippet to add the data-la-dn-price attribute to the price section. Also, add a data-la-dn-product-dynamic attribute to indicate the price should be updated when the data-la-dn-product-variant attribute changes.

data-la-dn-price data-la-dn-product-dynamic

Example

The following example shows how all the elements come together:

<div data-la-dn-quickview>
    ...
    <div data-la-dn-product-handle="my-product" 
         data-la-dn-product-variant="123456">
        ...
        <div class="price" data-la-dn-price data-la-dn-product-dynamic>
            ...
            <span class="money">{{ variant.price }}</span>
            <s class="money">{{ variant.compare_at_price }}</s>
            ...
        </div>
        ...
    </div>
    ...
</div>
PreviousPaginationNextCart

Last updated 5 months ago

Was this helpful?