@nuskin/ns-product-lib 2.7.1-cx24-3684.1 → 2.7.1-cx24-3684.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.7.1-cx24-3684.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1-cx24-3684.1...v2.7.1-cx24-3684.2) (2023-04-16)
2
+
3
+
4
+ ### Fix
5
+
6
+ * added event pricing (#CX24-3684) ([fca7e9b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fca7e9b9f01d99682ddff162db40b4a727d018c1)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
7
+
1
8
  ## [2.7.1-cx24-3684.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.7.1-cx24-3684.1) (2023-04-13)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.7.1-cx24-3684.1",
3
+ "version": "2.7.1-cx24-3684.2",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/product.js CHANGED
@@ -75,7 +75,7 @@ const Product = function (productData) {
75
75
  //equinox inventory / stock label
76
76
  //@example "IN STOCK"
77
77
  this.inventory = "";
78
-
78
+
79
79
  // equinox specific properties
80
80
  this.equinoxProductId = "";
81
81
  this.properties = {};
@@ -262,6 +262,7 @@ const Product = function (productData) {
262
262
 
263
263
  if (option.isEqPromotion) {
264
264
  //retain product.price as original price
265
+ this.setPrice(this.getPricing(priceType));
265
266
  this.setCv(this.getCvWithType(priceType));
266
267
  this.setPv(this.getPvWithType(priceType));
267
268
  this.priceType = priceType;
@@ -384,7 +384,7 @@ const ProductData = {
384
384
  PVPrice
385
385
  } = this.getEqProductPromotions(product);
386
386
  const productPrice = eventName ? defaultProductPrice : product.priceFacets["Regular Price"];
387
- const discountedPrice = eventName ? computedPrice : product.priceFacets["Regular Price"];
387
+ const discountedPrice = eventName ? computedPrice : product.priceFacets["Wholesale Price"];
388
388
  const productCVPrice = eventName ? CVPrice : product.priceFacets.CV;
389
389
  const productPVPrice = eventName ? PVPrice : product.priceFacets.PV;
390
390
  const wholeSalePrice = eventName ? defaultProductPrice : product.priceFacets["Wholesale Price"];