@nuskin/ns-product-lib 2.21.1 → 2.22.0-mdigi-6056.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.21.1",
3
+ "version": "2.22.0-mdigi-6056.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": {
@@ -293,6 +293,7 @@ async function mapProduct(product, market, locale, config) {
293
293
  "sku": sku,
294
294
  "globalProductID": productOrVariant.globalId && productOrVariant.globalId !== productOrVariant.sku ? productOrVariant.globalId : productOrVariant.id,
295
295
  "title": productOrVariant.title,
296
+ "categories": productOrVariant.categories || [],
296
297
  "country": market,
297
298
  "language": locale,
298
299
  "shortDescr": productOrVariant.description,
package/src/product.js CHANGED
@@ -18,6 +18,7 @@ const Product = function (productData) {
18
18
  this.addOns = [];
19
19
  this.restrictedMarkets = [];
20
20
  this.productCarouselImages = [];
21
+ this.categories = [];
21
22
  this.locallyProduced = false;
22
23
 
23
24
  //class variables to be used instead of getters/setters
@@ -497,6 +498,7 @@ const Product = function (productData) {
497
498
  retData.sku = this.sku;
498
499
  retData.globalProductID = this.globalProductID;
499
500
  retData.title = this.title;
501
+ retData.categories = this.categories;
500
502
  retData.country = this.country;
501
503
  retData.language = this.lang;
502
504
  retData.shortDescr = this.shortDescr;
@@ -601,6 +603,7 @@ const Product = function (productData) {
601
603
  }
602
604
  this.globalProductID = data.globalProductID || '';
603
605
  this.title = data.title;
606
+ this.categories = data.categories;
604
607
  this.country = data.country;
605
608
  this.lang = data.language;
606
609
  this.shortDescr = data.shortDescr;