@nuskin/ns-product-lib 2.18.0 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.18.0",
3
+ "version": "2.19.0",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -22,7 +22,7 @@
22
22
  "@nuskin/configuration-sdk": "2.3.2",
23
23
  "@nuskin/ns-common-lib": "1.4.7",
24
24
  "@nuskin/ns-util": "4.5.4",
25
- "@nuskin/product-lib": "2.2.0",
25
+ "@nuskin/product-lib": "2.2.1",
26
26
  "axios": "1.6.7",
27
27
  "axios-mock-adapter": "1.21.2",
28
28
  "eslint": "^8.56.0",
@@ -551,8 +551,11 @@ function mapPromos(product) {
551
551
  if ((product.price.retailSales !== null && product.price.retailSales >= 0) || (product.price.wholesaleSales !== null && product.price.wholesaleSales >= 0)) {
552
552
  if (product.pricingJson) {
553
553
  const parsedPricing = JSON.parse(product.pricingJson)
554
- const promotion = parsedPricing.promotion
554
+ let promotion = parsedPricing.promotion
555
555
  if (promotion && promotion.length) {
556
+ if (promotion.length > 1) {
557
+ promotion = promotion.filter(p=>p.message !== 'Bundle discount')
558
+ }
556
559
  const offerId = promotion[0].offerId || 'EQPROMO'
557
560
  return {
558
561
  priceMap: {[`${offerId}-WRTL`]: product.price.retailSales, [`${offerId}-WWHL`]: product.price.wholesaleSales},