Storefront API

This section documents the API available to theme developers and app developers to interact with Discount Ninja on a Shopify storefront.

Discount Ninja's storefront components

Discount Ninja includes frontend components that interact with the storefront and allow the app to:

  • Discover available promotions based on the user's context

  • Calculate discounts for products based on applicable promotions

  • Apply those discounts to the products displayed on the storefront on the product pages (PDP), collection pages (PLP) and the cart

The key storefront component is the Price Rule Engine, documented here.

Extending and integrating

Check out our JavaScript API if you want to extend the capabilities of Discount Ninja's Price Rule Engine or integrate it with your theme or your app.

The functions and events provided by the JavaScript API can be used to integrate with:

  • custom drawer carts

  • subscription apps

  • loyalty apps

  • ...

Widgets

Additionally, the app includes components that help to increase Average Order Value and increase Conversion Rate by effectively displaying promotions using widgets.

Learn more about widgets here.

Last updated