@nuskin/ns-shop 7.7.0-mdigi-6056.3 → 7.7.0-mdigi-6056.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-shop",
3
- "version": "7.7.0-mdigi-6056.3",
3
+ "version": "7.7.0-mdigi-6056.5",
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
@@ -1415,6 +1415,7 @@ export default function Cart(cartData) {
1415
1415
  'id': flatItem.sku,
1416
1416
  'price': flatItem.price,
1417
1417
  'quantity': Math.abs(diffQty),
1418
+ 'taxonomy': flatItem.taxonomy,
1418
1419
  'sales_price': flatItem.salesPrice,
1419
1420
  'unit_price': flatItem.unitPrice,
1420
1421
  'product_image_url': flatItem.product_image_url
@@ -293,7 +293,7 @@ export default function CartItem(cartItemData) {
293
293
  return this.product.marketAttributes;
294
294
  }
295
295
 
296
- this.salesPrice = function () {
296
+ this.unitPrice = function () {
297
297
  if (AccountManager.isCustomer() || AccountManager.isPreferredCustomer()) {
298
298
  return this.product.priceMap.RTL;
299
299
  } else if (AccountManager.isDistributor()) {
@@ -301,7 +301,7 @@ export default function CartItem(cartItemData) {
301
301
  }
302
302
  }
303
303
 
304
- this.unitPrice = function () {
304
+ this.salesPrice = function () {
305
305
  if (AccountManager.isCustomer() || AccountManager.isPreferredCustomer()) {
306
306
  if (this.product.priceType.WADR) {
307
307
  return this.product.priceMap.WADR;
@@ -377,6 +377,7 @@ export default function CartItem(cartItemData) {
377
377
  retVal.variants = this.product.variants;
378
378
  retVal.marketAttributes = this.product.marketAttributes;
379
379
  retVal.product_image_url = this.product.fullImage;
380
+ retVal.taxonomy = this.product.title ? this.product.title.split(' ')[0] : '';
380
381
  retVal.salesPrice = AccountManager.isLoggedIn()? this.salesPrice() : null;
381
382
  retVal.unitPrice = AccountManager.isLoggedIn()? this.unitPrice() : null;
382
383