@nuskin/ns-product-lib 2.18.0 → 2.19.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +2 -2
- package/src/graph-ql/product.js +4 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nuskin/ns-product-lib",
|
3
|
-
"version": "2.
|
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.
|
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",
|
package/src/graph-ql/product.js
CHANGED
@@ -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
|
-
|
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},
|