A React SDK for integrating ParityDeals dynamic pricing and discounts directly into your React application.
ParityDealsProvider
at the root level. This sets up the necessary context.
You can copy your product ID from the listing or promotion details page:
Attribute | Type | Default | Description |
---|---|---|---|
productId | string | ” | The product ID to display |
environment | sandbox|production | ’production’ | The environment to use. If you want to use the sandbox, you must provide this. |
baseCurrencyCode | string | USD | If you use any base currency other than USD, you must provide this. Currency conversion will be done using this code. |
baseCurrencySymbol | string | $ | If you use any base currency other than USD, you must provide this. Only for the displaying purpose, but still important. |
PDBanner
Option | Type | Default | Description |
---|---|---|---|
localizePricing | boolean | true | Convert to local currency |
price (required) | number | 0 | The price of the product. |
className | string | ” | custom class name for the component |
currencyDisplay | symbol|code|name | symbol | The currency display format. This only works on the data-pd-price-formatted element. |
showDecimal | boolean | false | Whether to show decimals |
minimumDecimalDigits | number | 0 | The minimum number of decimal digits |
maximumDecimalDigits | number | 2 | The maximum number of decimal digits. Maximum is 2. |
isOriginalDisplay | boolean | false | Used to show the original price when there’s a discount, typically for comparison (e.g., strikethrough price). This price is not modified by discounts but may still be affected by currency conversions. |
displayPrice | number | 0 | The price to display. If not provided, the original price will be displayed. |
Option | Type | Default | Description |
---|---|---|---|
localizePricing | boolean | true | Convert to local currency |
price (required) | number | 0 | The price of the product. |
className | string | ” | custom class name for the component |
Option | Type | Default | Description |
---|---|---|---|
localizePricing | boolean | true | Convert to local currency |
price (required) | number | 0 | The price of the product. |
className | string | ” | custom class name for the component |
minimumDecimalDigits | number | 0 | The minimum number of decimal digits |
maximumDecimalDigits | number | 2 | The maximum number of decimal digits. Maximum is 2. |
Option | Type | Default | Description |
---|---|---|---|
localizePricing | boolean | true | Convert to local currency |
className | string | ” | custom class name for the component |
PDPriceCurrencyCode
Option | Type | Default | Description |
---|---|---|---|
localizePricing | boolean | true | Convert to local currency |
className | string | ” | custom class name for the component |
Option | Type | Default | Description |
---|---|---|---|
localizePricing | boolean | true | Convert to local currency |
price (required) | number | 0 | The price of the product. |
className | string | ” | custom class name for the component |
environment
option to sandbox
in the ParityDealsProvider
.