Events
Events are the primary way to interact with the Price Rule Engine. The app publishes events when data becomes available and subscribes to a number of events that can be published by third parties.
The documentation below describes the API as of version 9.x of the script.
Public properties or functions that are not in the discountNinja.api
namespace should be considered obsolete and will be removed in the next major version release.
Using undocumented functions or objects will result in issues as custom code that relies on those functions or objects may break in the future when Discount Ninja's script is automatically updated.
API ready
Details
Syntax
Promotions loaded
Details
Syntax
Product discount calculated
Details
Syntax
Cart updated
Details
Syntax
Trigger checkout
Details
Syntax
Convert money fields
Details
Syntax
Collection products updated
Details
Syntax
Variant changed
Details
Syntax
Drawer cart opened
Details
Syntax
Last updated