Unfortunately, Shopify scripts cannot be combined with Discount Ninja promotions.
Shopify Plus customers can create a number of different types of scripts using the Script Editor. Some of these scripts (typically shipping scripts and payment scripts) are complementary to what Discount Ninja offers. Other scripts (line item scripts that implement discounts) can be replaced by Discount Ninja.
By default, Discount Ninja creates discounted checkouts using Draft Orders. In this mode, Shopify will not execute scripts. The documentation explains:
Line item scripts, shipping scripts, and payment scripts don't work with draft orders or the draft orders checkout.
Source: https://help.shopify.com/en/manual/apps/apps-by-shopify/script-editor/limitations#draft-orders.
Discount Ninja also supports creating discounted checkouts using the Checkout API (using our free companion app: Discount Ninja Sales Channel). Although undocumented, it seems Shopify scripts are also not executed on this type of checkout.
Workaround: use Discount Code checkout mode
Alternatively, you can use the discount code checkout mode, which uses the standard checkout screen and automatically adds a generated discount code.
This can be done from Settings > Checkout options