@nuskin/ns-shop 7.0.5-cx1-13272.6 → 7.0.5-cx1-13272.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cart/cart.js +7 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-shop",
3
- "version": "7.0.5-cx1-13272.6",
3
+ "version": "7.0.5-cx1-13272.7",
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": {
package/src/cart/cart.js CHANGED
@@ -832,11 +832,12 @@ export default function Cart(cartData) {
832
832
  };
833
833
 
834
834
  this.updateProductEventPrice = function(item, activeEvents) {
835
- let itemUpdated = false;
835
+ let eventNameAdded = false;
836
836
  const user = UserService.getUser();
837
837
  const priceType = ShopContext.getPriceType(item.isAdr(), user);
838
+ const eventName = item.product.eventName;
838
839
  if (item.product.setPriceAndPvFromType(priceType, activeEvents)) {
839
- itemUpdated = true;
840
+ if (!eventName && item.product.eventName) eventNameAdded = true;
840
841
  SalesEventService.logAnalyticInfo(
841
842
  'product-price-to-event-price',
842
843
  item.product.eventName,
@@ -850,16 +851,16 @@ export default function Cart(cartData) {
850
851
  }
851
852
  });
852
853
  }
853
- return itemUpdated;
854
+ return eventNameAdded;
854
855
  };
855
856
 
856
857
  this.updateEventPrices = function(activeEvents) {
857
- let cartUpdated = false;
858
+ let eventNameAdded = false;
858
859
  getCartItems({cartItems: true}).forEach(item => {
859
860
  if (this.updateProductEventPrice(item, activeEvents))
860
- cartUpdated = true;
861
+ eventNameAdded = true;
861
862
  });
862
- return cartUpdated;
863
+ return eventNameAdded;
863
864
  };
864
865
 
865
866
  this.setMissingEventNames = async (order) => {