@nuskin/ns-product-lib 2.10.0-cx24-4696.1 → 2.10.0-cx24-4696.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/productData.js +6 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [2.10.0-cx24-4696.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.0-cx24-4696.1...v2.10.0-cx24-4696.2) (2023-07-27)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* Support for bundles ([dce4424](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/dce44249c9edb5ed264ff012ab9ffa6422fe1dca))
|
7
|
+
|
1
8
|
# [2.10.0-cx24-4696.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.9.1...v2.10.0-cx24-4696.1) (2023-07-18)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -325,6 +325,7 @@ const ProductData = {
|
|
325
325
|
* @returns {obj} promotion
|
326
326
|
*/
|
327
327
|
getEqProductPromotions(product) {
|
328
|
+
let defaultProductPrice;
|
328
329
|
|
329
330
|
if (!Array.isArray(product.promotion)) {
|
330
331
|
return {
|
@@ -334,8 +335,11 @@ const ProductData = {
|
|
334
335
|
eventName: null
|
335
336
|
}
|
336
337
|
}
|
337
|
-
|
338
|
-
|
338
|
+
if (product.type === "bundle") {
|
339
|
+
defaultProductPrice = product.totalValue ? product.totalValue.priceFacets["Regular Price"] : 0;
|
340
|
+
} else {
|
341
|
+
defaultProductPrice = product.totalValue ? product.totalValue.originalPrice : 0;
|
342
|
+
}
|
339
343
|
const computedPrice = product.totalValue && product.totalValue.priceAfterDiscount
|
340
344
|
? product.totalValue.priceAfterDiscount
|
341
345
|
: 0;
|