@nuskin/ns-shop 7.8.2 → 7.8.3-pa-933.1
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/cartService.js +7 -1
package/package.json
CHANGED
package/src/cart/cartService.js
CHANGED
|
@@ -762,7 +762,13 @@ async function checkProductLanguages() {
|
|
|
762
762
|
const promises = [];
|
|
763
763
|
const changeditems = []
|
|
764
764
|
_getCart().getItems({cartItems: true}).forEach((cartItem) => {
|
|
765
|
-
if
|
|
765
|
+
// if there is no language (lang) set on the product this is a variant and variants
|
|
766
|
+
// do not have this set. It likely has the correct language used for product data.
|
|
767
|
+
if (!cartItem.product.lang) {
|
|
768
|
+
cartItem.product.lang = runConfig.language;
|
|
769
|
+
promises.push(Promise.resolve({product: cartItem.product}));
|
|
770
|
+
changeditems.push(cartItem);
|
|
771
|
+
} else if (runConfig.language !== cartItem.product.lang) {
|
|
766
772
|
promises.push(ProductService.getProductBySku({
|
|
767
773
|
cntryCd: runConfig.country,
|
|
768
774
|
language: runConfig.language,
|