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
  • Do I need Discount Ninja's theme edits?
  • Extension mechanisms
  • Theme extensions
  • App blocks v Code edits

Was this helpful?

  1. Discount Ninja Developer Hub

Theme edits

Learn how Discount Ninja complements your theme to help merchants to promote offers.

Do I need Discount Ninja's theme edits?

In short: yes.

If you do not have access to someone with technical skills, please request our support team to set it up for you.

The theme edits will allow you to see the correct price of all products that are discounted through Discount Ninja throughout your store. It also enables all the widgets that can be configured in the app that will help you to communicate the offers to your customers.

Extension mechanisms

Discount Ninja offers two extension mechanisms to display widgets and show strikethrough pricing:

  • Theme extensions: add widgets using App blocks

  • Custom code edits: edit the code of the theme to indicate placeholders for widgets and/or mark where prices are displayed.

Use App blocks when possible. Custom code edits are only required for scenarios that are not currently supported by Shopify on Online Store 2.0. Specifically, Discount Ninja's custom code edit support helps to overcome the lack of support for App blocks in the templates for collections and (drawer) carts. These templates do not allow for the use of App blocks in repeating sections (collection products or cart items).

Theme extensions

The app uses theme extensions to extend the functionality of the online store. Specifically:

  • App embeds are used to add scripts.

  • App blocks are used to include widgets on the storefront.

Alternatively, users can choose to add custom code to add widgets.

App blocks v Code edits

The following table explains the advantages of each approach:

App blocks
Code edits

Available on stores that do not have an Online Store 2.0 theme?

No

Yes

Requires manually cleaning up code in the theme after uninstalling the app?

No

Yes

Maximum flexibility to position each widget?

No

Yes

Optimal performance?

Yes

Yes

Available for each widget?

No

Yes

PreviousIntegrationNextApp blocks

Last updated 5 months ago

Was this helpful?

Read more about the available App blocks .

Read more about how to edit theme code .

here
here