@nuskin/ns-shop 7.1.1 → 7.1.3
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-shop",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.3",
|
|
4
4
|
"description": "The description that will amaze and astound your audience when they read it",
|
|
5
5
|
"main": "src/shop.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@nuskin/ns-common-lib": "1.4.7",
|
|
27
27
|
"@nuskin/ns-feature-flags": "1.4.7",
|
|
28
28
|
"@nuskin/ns-loyalty-web": "1.5.6",
|
|
29
|
-
"@nuskin/ns-product-lib": "2.19.
|
|
29
|
+
"@nuskin/ns-product-lib": "2.19.2",
|
|
30
30
|
"@nuskin/nuskinjquery": "2.3.1",
|
|
31
31
|
"@nuskin/order-model": "3.1.3",
|
|
32
32
|
"@nuskin/product-lib": "2.2.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@nuskin/exclusive-offer-sdk": "1.2.4",
|
|
43
43
|
"@nuskin/ns-account": "5.9.2",
|
|
44
44
|
"@nuskin/ns-jsanalyzer": "1.0.1",
|
|
45
|
-
"@nuskin/ns-product": "3.50.
|
|
45
|
+
"@nuskin/ns-product": "3.50.8",
|
|
46
46
|
"@nuskin/ns-util": "4.6.1",
|
|
47
47
|
"axios-mock-adapter": "1.22.0",
|
|
48
48
|
"babel-cli": "6.26.0",
|
package/src/cart/cartItem.js
CHANGED
|
@@ -42,12 +42,14 @@ export default function CartItem(cartItemData) {
|
|
|
42
42
|
|
|
43
43
|
// fix image paths for non-edge/firefox
|
|
44
44
|
if (!isEdge && !isFirefox) {
|
|
45
|
-
this.product.fullImage
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
if (this.product.fullImage && !this.product.fullImage.includes("media.nuskin.com/transform")) {
|
|
46
|
+
this.product.fullImage = this.product.fullImage
|
|
47
|
+
? `${this.product.fullImage.split("?")[0]}?format=pjpg`
|
|
48
|
+
: undefined;
|
|
49
|
+
this.product.thumbnail = this.product.thumbnail
|
|
50
|
+
? `${this.product.thumbnail.split("?")[0]}?format=pjpg`
|
|
51
|
+
: undefined;
|
|
52
|
+
}
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
this.qty = cartItemData.qty;
|
|
@@ -213,12 +213,14 @@ const handleDetailResponse = async (responseData, options) => {
|
|
|
213
213
|
|
|
214
214
|
// fix image paths for non-edge/firefox
|
|
215
215
|
if (!isEdge && !isFirefox) {
|
|
216
|
-
retVal.product.fullImage
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
216
|
+
if (retVal.product.fullImage && !retVal.product.fullImage.includes("media.nuskin.com/transform")) {
|
|
217
|
+
retVal.product.fullImage = retVal.product.fullImage
|
|
218
|
+
? `${retVal.product.fullImage.split("?")[0]}?format=pjpg`
|
|
219
|
+
: undefined;
|
|
220
|
+
retVal.product.thumbnail = retVal.product.thumbnail
|
|
221
|
+
? `${retVal.product.thumbnail.split("?")[0]}?format=pjpg`
|
|
222
|
+
: undefined;
|
|
223
|
+
}
|
|
222
224
|
}
|
|
223
225
|
} else {
|
|
224
226
|
retVal.success = false;
|
|
@@ -179,12 +179,14 @@ let ProductService = function() {
|
|
|
179
179
|
|
|
180
180
|
// fix image paths for non-edge/firefox
|
|
181
181
|
if (!isEdge && !isFirefox) {
|
|
182
|
-
retVal.product.fullImage
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
if (retVal.product.fullImage && !retVal.product.fullImage.includes("media.nuskin.com/transform")) {
|
|
183
|
+
retVal.product.fullImage = retVal.product.fullImage
|
|
184
|
+
? `${retVal.product.fullImage.split("?")[0]}?format=pjpg`
|
|
185
|
+
: undefined;
|
|
186
|
+
retVal.product.thumbnail = retVal.product.thumbnail
|
|
187
|
+
? `${retVal.product.thumbnail.split("?")[0]}?format=pjpg`
|
|
188
|
+
: undefined;
|
|
189
|
+
}
|
|
188
190
|
}
|
|
189
191
|
} else {
|
|
190
192
|
retVal.success = false;
|
|
@@ -518,12 +518,14 @@ async function addSapItem(newItem, sapItem, sapSkus, adr, isAdrItem, replace) {
|
|
|
518
518
|
|
|
519
519
|
// fix image paths for non-edge/firefox
|
|
520
520
|
if (!isEdge && !isFirefox) {
|
|
521
|
-
product.fullImage
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
521
|
+
if (product.fullImage && !product.fullImage.includes("media.nuskin.com/transform")) {
|
|
522
|
+
product.fullImage = product.fullImage
|
|
523
|
+
? `${product.fullImage.split("?")[0]}?format=pjpg`
|
|
524
|
+
: undefined;
|
|
525
|
+
product.thumbnail = product.thumbnail
|
|
526
|
+
? `${product.thumbnail.split("?")[0]}?format=pjpg`
|
|
527
|
+
: undefined;
|
|
528
|
+
}
|
|
527
529
|
}
|
|
528
530
|
|
|
529
531
|
// Try to update the count, flavor, shade, size, and product points values for the SapItem;
|
|
@@ -278,12 +278,14 @@ let productSearchService = function() {
|
|
|
278
278
|
|
|
279
279
|
// fix image paths for non-edge/firefox
|
|
280
280
|
if (!isEdge && !isFirefox) {
|
|
281
|
-
addProduct.fullImage
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
281
|
+
if (addProduct.fullImage && !addProduct.fullImage.includes("media.nuskin.com/transform")) {
|
|
282
|
+
addProduct.fullImage = addProduct.fullImage
|
|
283
|
+
? `${addProduct.fullImage.split("?")[0]}?format=pjpg`
|
|
284
|
+
: undefined;
|
|
285
|
+
addProduct.thumbnail = addProduct.thumbnail
|
|
286
|
+
? `${addProduct.thumbnail.split("?")[0]}?format=pjpg`
|
|
287
|
+
: undefined;
|
|
288
|
+
}
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
// set price type
|
|
@@ -557,12 +559,14 @@ let productSearchService = function() {
|
|
|
557
559
|
|
|
558
560
|
// fix image paths for non-edge/firefox
|
|
559
561
|
if (!isEdge && !isFirefox) {
|
|
560
|
-
addProduct.fullImage
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
562
|
+
if (addProduct.fullImage && !addProduct.fullImage.includes("media.nuskin.com/transform")) {
|
|
563
|
+
addProduct.fullImage = addProduct.fullImage
|
|
564
|
+
? `${addProduct.fullImage.split("?")[0]}?format=pjpg`
|
|
565
|
+
: undefined;
|
|
566
|
+
addProduct.thumbnail = addProduct.thumbnail
|
|
567
|
+
? `${addProduct.thumbnail.split("?")[0]}?format=pjpg`
|
|
568
|
+
: undefined;
|
|
569
|
+
}
|
|
566
570
|
}
|
|
567
571
|
|
|
568
572
|
const priceType = getCachedConfigField('showWholeSalePricing') && !AccountManager.isLoggedIn()
|