@nuskin/ns-product-lib 2.5.0-cx24-2179.2.3 → 2.5.0-cx24-2179.2.5
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 -3
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [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)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* 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)
|
7
|
+
|
8
|
+
# [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)
|
9
|
+
|
10
|
+
|
11
|
+
### New
|
12
|
+
|
13
|
+
* added eq promoion bypass for setPriceAndPvFromType v2 (#CX24-2179) ([25bde9a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/25bde9a8e19b1e4e44e37457dfb087e0a6212ee1)), 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.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.2...v2.5.0-cx24-2179.2.3) (2022-12-05)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -232,6 +232,7 @@ const Product = function(productData) {
|
|
232
232
|
// : (_priceType ? _priceType : this.priceType),
|
233
233
|
const priceType = _priceType ? _priceType : this.priceType;
|
234
234
|
const eventPricing = getEventPricing(this, priceType, _activeEvents);
|
235
|
+
console.log({context: 'NsProductLib.setPriceAndPvFromType', eventPricing: eventPricing});
|
235
236
|
|
236
237
|
let changed = false;
|
237
238
|
if ((
|
@@ -259,7 +260,8 @@ const Product = function(productData) {
|
|
259
260
|
if (
|
260
261
|
this.variants[variantSku].setPriceAndPvFromType(
|
261
262
|
priceType,
|
262
|
-
_activeEvents
|
263
|
+
_activeEvents,
|
264
|
+
option
|
263
265
|
)
|
264
266
|
) {
|
265
267
|
changed = true;
|
@@ -289,7 +291,7 @@ const Product = function(productData) {
|
|
289
291
|
this.priceMap[type] = price;
|
290
292
|
};
|
291
293
|
|
292
|
-
this.addPricingFromStatus = function(productStatus, priceType) {
|
294
|
+
this.addPricingFromStatus = function(productStatus, priceType, option ={}) {
|
293
295
|
let modified = false;
|
294
296
|
|
295
297
|
if (!priceType) {
|
@@ -327,7 +329,7 @@ const Product = function(productData) {
|
|
327
329
|
if(productStatus.childSkus) {
|
328
330
|
this.childSkus = productStatus.childSkus;
|
329
331
|
}
|
330
|
-
this.setPriceAndPvFromType(priceType);
|
332
|
+
this.setPriceAndPvFromType(priceType, null, option);
|
331
333
|
modified = true;
|
332
334
|
} else {
|
333
335
|
let variant = this.getVariant(productStatusSku);
|