@nuskin/ns-product-lib 2.6.1-cx24-3608.2 → 2.6.1-cx24-3608.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/src/productData.js +12 -9
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## [2.6.1-cx24-3608.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-3608.3...v2.6.1-cx24-3608.4) (2023-03-15)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
5
|
+
|
6
|
+
* imageURL issue when product is kit ([0bde1fb](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0bde1fb0ce99186a30859c2f3509d32c1861cf7b))
|
7
|
+
* imageURL issue when product is kit ([e302726](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/e30272648ad6214c0dca08f40a6a3f5511c661cd))
|
8
|
+
|
9
|
+
## [2.6.1-cx24-3608.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-3608.2...v2.6.1-cx24-3608.3) (2023-03-15)
|
10
|
+
|
11
|
+
|
12
|
+
### Fix
|
13
|
+
|
14
|
+
* imageURL issue when product is kit ([0e4281d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0e4281de4435d1a5749ff9b6d52a7c4a45d75d6d))
|
15
|
+
|
1
16
|
## [2.6.1-cx24-3608.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1-cx24-3608.1...v2.6.1-cx24-3608.2) (2023-03-15)
|
2
17
|
|
3
18
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -133,13 +133,14 @@ const ProductData = {
|
|
133
133
|
const regex = /\d+\.\d+/
|
134
134
|
let thumbnailImage = ''
|
135
135
|
|
136
|
-
if (imageURL
|
137
|
-
|
138
|
-
|
139
|
-
|
136
|
+
if (imageURL !== "") {
|
137
|
+
if (imageURL.includes('contentstack')) {
|
138
|
+
thumbnailImage = imageURL + '?width=40'
|
139
|
+
} else {
|
140
|
+
thumbnailImage = imageURL.replace(regex, '40.40')
|
141
|
+
}
|
140
142
|
}
|
141
143
|
|
142
|
-
|
143
144
|
const { eventName, eventLabels, computedPrice, defaultProductPrice } = this.getEqProductPromotions(eqVariant);
|
144
145
|
const productPrice = eventName ? defaultProductPrice : eqVariant.priceFacets["Regular Price"];
|
145
146
|
const discountedPrice = eventName ? computedPrice : eqVariant.priceFacets["Regular Price"];
|
@@ -356,10 +357,12 @@ const ProductData = {
|
|
356
357
|
const regex = /\d+\.\d+/
|
357
358
|
let thumbnailImage = ''
|
358
359
|
|
359
|
-
if (imageURL
|
360
|
-
|
361
|
-
|
362
|
-
|
360
|
+
if (imageURL !== "") {
|
361
|
+
if (imageURL.includes('contentstack')) {
|
362
|
+
thumbnailImage = imageURL + '?width=40'
|
363
|
+
} else {
|
364
|
+
thumbnailImage = imageURL.replace(regex, '40.40')
|
365
|
+
}
|
363
366
|
}
|
364
367
|
|
365
368
|
if (productData.sku && productData.sku.length > 1) {
|