@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.
- package/package.json +1 -1
- package/src/cart/cart.js +7 -6
package/package.json
CHANGED
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
|
|
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
|
-
|
|
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
|
|
854
|
+
return eventNameAdded;
|
|
854
855
|
};
|
|
855
856
|
|
|
856
857
|
this.updateEventPrices = function(activeEvents) {
|
|
857
|
-
let
|
|
858
|
+
let eventNameAdded = false;
|
|
858
859
|
getCartItems({cartItems: true}).forEach(item => {
|
|
859
860
|
if (this.updateProductEventPrice(item, activeEvents))
|
|
860
|
-
|
|
861
|
+
eventNameAdded = true;
|
|
861
862
|
});
|
|
862
|
-
return
|
|
863
|
+
return eventNameAdded;
|
|
863
864
|
};
|
|
864
865
|
|
|
865
866
|
this.setMissingEventNames = async (order) => {
|