@nuskin/ns-product-lib 2.13.1 → 2.13.2-cx24-511910.1
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -8,8 +8,11 @@ const mapBackOrderDate = require('./backOrderDate');
|
|
8
8
|
*/
|
9
9
|
function childSKUBundle(kits, product) {
|
10
10
|
let sku;
|
11
|
-
|
12
|
-
|
11
|
+
|
12
|
+
let personalOffer = {};
|
13
|
+
personalOffer = JSON.parse(sessionStorage.getItem('personalOffer'))
|
14
|
+
if (personalOffer !== null && personalOffer.active) {
|
15
|
+
|
13
16
|
//get the products with variants selected
|
14
17
|
const productWithVariant = personalOffer.products.filter((sku) => sku.variantSelected !== null)[0]
|
15
18
|
if (productWithVariant !== null) {
|
package/src/graph-ql/product.js
CHANGED
@@ -290,9 +290,11 @@ function mapChildSKU(kitBundleProducts, productSku) {
|
|
290
290
|
if (!kitBundleProducts || !kitBundleProducts.kitProducts) {
|
291
291
|
return [];
|
292
292
|
}
|
293
|
-
let personalOffer = JSON.parse(sessionStorage.getItem('personalOffer'))
|
294
293
|
let productWithVariant;
|
295
|
-
|
294
|
+
let personalOffer = {};
|
295
|
+
|
296
|
+
personalOffer = JSON.parse(sessionStorage.getItem('personalOffer'))
|
297
|
+
if (personalOffer !== null && personalOffer.active) {
|
296
298
|
productWithVariant = personalOffer.products.filter((sku) =>
|
297
299
|
sku.type === 'bundle' && sku.variantSelected !== null && sku.sku === productSku
|
298
300
|
)
|