@nuskin/product-components 3.20.0-mdigi-7127.3 → 3.20.0-mdigi-7127.5

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.
@@ -200,14 +200,14 @@ export default {
200
200
  name: product.title,
201
201
  price: product.price,
202
202
  taxonomy:
203
- product.categories?.[0]?.displayName || "all_products",
203
+ (product.categories && product.categories[0] && product.categories[0].displayName) || "all_products",
204
204
  sales_price: this.isLoggedIn
205
205
  ? isWholesale
206
- ? product?.price?.wholesaleSales ||
207
- product?.price?.wholesale
208
- : product?.price?.retailSales || product?.price?.retail
206
+ ? (product && product.price && product.price.wholesaleSales) ||
207
+ (product && product.price && product.price.wholesale)
208
+ : (product && product.price && product.price.retailSales) || (product && product.price && product.price.retail)
209
209
  : null,
210
- unit_price: this.isLoggedIn ? product?.price : null
210
+ unit_price: this.isLoggedIn ? (product && product.price) : null
211
211
  }))
212
212
  }
213
213
  });
@@ -14,8 +14,8 @@
14
14
  </template>
15
15
 
16
16
  <script>
17
- import { CartService } from "@nuskin/ns-shop";
18
- import { events } from "@nuskin/ns-util";
17
+ import { CartService, CurrencyService } from "@nuskin/ns-shop";
18
+ import { events, RunConfigService } from "@nuskin/ns-util";
19
19
  import {
20
20
  getPersonalizedRecommendations,
21
21
  getRelatedProducts
@@ -68,6 +68,11 @@ export default {
68
68
  }
69
69
  },
70
70
  created() {
71
+ const runConfig = RunConfigService.getRunConfig();
72
+ this.currencyCode = CurrencyService.getCurrency(
73
+ runConfig.country
74
+ ).currencyCode;
75
+
71
76
  // When items are added to the cart, omit them from recommendations.
72
77
  events.subscribe(events.shop.CART_UPDATED, info => {
73
78
  if (info.add) {
@@ -92,6 +97,11 @@ export default {
92
97
  },
93
98
  true
94
99
  );
100
+ events.publish(events.shop.PAGE_VIEW, {
101
+ event: "pageView",
102
+ pageType: "category_listing",
103
+ currency: this.currencyCode
104
+ });
95
105
  },
96
106
  mounted() {
97
107
  this.initRecommendations(this.productId);
package/docs/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- # [3.20.0-mdigi-7127.3](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.20.0-mdigi-7127.2...v3.20.0-mdigi-7127.3) (2026-01-07)
1
+ # [3.20.0-mdigi-7127.5](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.20.0-mdigi-7127.4...v3.20.0-mdigi-7127.5) (2026-01-08)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/product-components",
3
- "version": "3.20.0-mdigi-7127.3",
3
+ "version": "3.20.0-mdigi-7127.5",
4
4
  "description": "Nu Skin Product Components",
5
5
  "main": "index.js",
6
6
  "scripts": {