Comment on page
discountNinjaContext object
Documentation regarding the context object provided by Discount Ninja.
This page is under construction
This object is used by Discount Ninja widgets and components. It is not part of the Public API and third-party developers should therefore not rely on it. The information provided here is for information only.
The
discountNinjaContext
JavaScript object is available in the global scope.DesignMode (boolean)
Shop (string)
RootRoute
CartRoute
Cart
CollectionProducts ([CollectionProduct])
CartProducts ([CartProduct])
ProductVariants ([ProductVariant])
Promotion
Settings
MoneyFormatting
ProductPage (MoneyFormattingForPage)
Collection (MoneyFormattingForPage)
DrawerCartProduct (MoneyFormattingForPage)
DrawerCartLine (MoneyFormattingForPage)
DrawerCartTotal (MoneyFormattingForPage)
CartProduct (MoneyFormattingForPage)
CartLine (MoneyFormattingForPage)
CartTotal (MoneyFormattingForPage)
The
MoneyFormattingForPage
type specifies the following properties:IncludeCurrency (boolean)
UseCurrencySymbol (boolean)
IncludeTrailingZeros (boolean)
Precision (number)
ZeroIsFree (boolean)
CentsSuperscript (boolean)
Status (string)
Signature (string)
Country
ISOCode
Name
ShopCurrency
PresentmentCurrency
PresentmentCurrencyMoney
MoneyFormat
Locale
Labels
From
Here
Free
Soldout
UnitPriceSeparator
Accessibility
Price
DiscountedPrice
OriginalPrice
MSRP
UnitPrice
UnitPer
CompliancePrice
UnitPriceSeparator
Customer
Id
NumberOfOrders
Email
Tags
FirstName
LastName
Product
These settings are configured in the app
Flags
Last modified 2mo ago