@nuskin/ns-product-lib 2.5.0-cx24-2179.2.4 → 2.5.0-cx24-2179.2.6
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/product.js +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [2.5.0-cx24-2179.2.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.5...v2.5.0-cx24-2179.2.6) (2022-12-05)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* added eq promoion bypass for setPriceAndPvFromType v4 (#CX24-2179) ([abcdd30](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/abcdd30223107786c0c2f9d1a8946053ef6dcef5)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
7
|
+
|
8
|
+
# [2.5.0-cx24-2179.2.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.4...v2.5.0-cx24-2179.2.5) (2022-12-05)
|
9
|
+
|
10
|
+
|
11
|
+
### New
|
12
|
+
|
13
|
+
* added eq promoion bypass for setPriceAndPvFromType v3 (#CX24-2179) ([79fe156](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/79fe1562d0cafc44f8945e57c316c8ba0b55a88b)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
14
|
+
|
1
15
|
# [2.5.0-cx24-2179.2.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.3...v2.5.0-cx24-2179.2.4) (2022-12-05)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -250,7 +250,6 @@ const Product = function(productData) {
|
|
250
250
|
|
251
251
|
if (option.isEqPromotion) {
|
252
252
|
//retain product.price as original price
|
253
|
-
this.setPrice(eventPricing.price || this.getPricing(priceType));
|
254
253
|
this.setCv(this.getCvWithType(priceType));
|
255
254
|
this.setPv(this.getPvWithType(priceType));
|
256
255
|
this.priceType = priceType;
|
@@ -261,7 +260,8 @@ const Product = function(productData) {
|
|
261
260
|
if (
|
262
261
|
this.variants[variantSku].setPriceAndPvFromType(
|
263
262
|
priceType,
|
264
|
-
_activeEvents
|
263
|
+
_activeEvents,
|
264
|
+
option
|
265
265
|
)
|
266
266
|
) {
|
267
267
|
changed = true;
|
@@ -291,7 +291,7 @@ const Product = function(productData) {
|
|
291
291
|
this.priceMap[type] = price;
|
292
292
|
};
|
293
293
|
|
294
|
-
this.addPricingFromStatus = function(productStatus, priceType) {
|
294
|
+
this.addPricingFromStatus = function(productStatus, priceType, option ={}) {
|
295
295
|
let modified = false;
|
296
296
|
|
297
297
|
if (!priceType) {
|
@@ -329,13 +329,13 @@ const Product = function(productData) {
|
|
329
329
|
if(productStatus.childSkus) {
|
330
330
|
this.childSkus = productStatus.childSkus;
|
331
331
|
}
|
332
|
-
this.setPriceAndPvFromType(priceType);
|
332
|
+
this.setPriceAndPvFromType(priceType, null, option);
|
333
333
|
modified = true;
|
334
334
|
} else {
|
335
335
|
let variant = this.getVariant(productStatusSku);
|
336
336
|
|
337
337
|
if (variant) {
|
338
|
-
if (variant.addPricingFromStatus(productStatus, priceType)) {
|
338
|
+
if (variant.addPricingFromStatus(productStatus, priceType, option)) {
|
339
339
|
variant.setMarketAttributes(productStatus);
|
340
340
|
updateBaseRanges(this, variant);
|
341
341
|
modified = true;
|