@nuskin/ns-shop 6.11.6 → 6.11.8
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
package/src/cart/cartItem.js
CHANGED
|
@@ -305,7 +305,7 @@ export default function CartItem(cartItemData) {
|
|
|
305
305
|
retVal.thumbnail = this.product.getThumbnail() || '';
|
|
306
306
|
retVal.title = this.product.title || 'Title Not Found';
|
|
307
307
|
retVal.description = this.product.getDescription();
|
|
308
|
-
retVal.isBackOrdered = this.product.backOrderDate != null
|
|
308
|
+
retVal.isBackOrdered = this.product.backOrderDate != null && this.product.backOrderDate != ""
|
|
309
309
|
retVal.backOrderedDate = this.product.backOrderDate;
|
|
310
310
|
|
|
311
311
|
retVal.qty = this.getQty();
|
package/src/cart/cartService.js
CHANGED
|
@@ -353,6 +353,8 @@ async function addProductToCart(options) {
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
+
options.product.isBackOrdered = (options.product.inventory === "BACKORDER") ? true : false
|
|
357
|
+
|
|
356
358
|
const language = options.product.lang || options.product.language;
|
|
357
359
|
options.product.lang = language;
|
|
358
360
|
options.product.language = language;
|
|
@@ -10,12 +10,13 @@ import axios from 'axios';
|
|
|
10
10
|
import { getCachedConfigField } from '@nuskin/configuration-sdk';
|
|
11
11
|
|
|
12
12
|
// Service URI Paths
|
|
13
|
-
const
|
|
13
|
+
const PMNT_BASE = '/shop-service/api/v2/payment';
|
|
14
14
|
const PMNT_PATH_AWS_V1 = '/paymentprofile/v1';
|
|
15
15
|
const PMNT_PATH_AWS_V2 = '/paymentprofile/v2';
|
|
16
|
-
const PMNT_TYPES_PATH_AWS = '/paymentOptions/v1';
|
|
17
16
|
const EXT_PMNT_PATH_LEGACY = '/external-payment/api/v1';
|
|
18
17
|
|
|
18
|
+
const PMNT_TYPES_PATH = PMNT_BASE + '/typesallowed';
|
|
19
|
+
|
|
19
20
|
// Response Body Keys
|
|
20
21
|
const PAYMENT_LIST = 'PaymentList';
|
|
21
22
|
const PAYMENT = 'Payment';
|
|
@@ -31,7 +32,7 @@ const getPmntURLV1 = () => getAWSBaseURL() + PMNT_PATH_AWS_V1;
|
|
|
31
32
|
|
|
32
33
|
const getPmntURLV2 = () => getAWSBaseURL() + PMNT_PATH_AWS_V2;
|
|
33
34
|
|
|
34
|
-
const getPmntTypeURL = () =>
|
|
35
|
+
const getPmntTypeURL = () => getLegacyBaseURL() + PMNT_TYPES_PATH;
|
|
35
36
|
|
|
36
37
|
const getExtPmntURL = () => getLegacyBaseURL() + EXT_PMNT_PATH_LEGACY;
|
|
37
38
|
|
|
@@ -295,7 +296,7 @@ async function getAvailableInstallmentCounts(options) {
|
|
|
295
296
|
options = Object.assign({}, DEFAULT_OPTIONS, options);
|
|
296
297
|
const params = { countryCode: options.country };
|
|
297
298
|
|
|
298
|
-
let url = `${getLegacyBaseURL()}${
|
|
299
|
+
let url = `${getLegacyBaseURL()}${PMNT_BASE}/installments?${UrlService.toQueryString(params)}`;
|
|
299
300
|
|
|
300
301
|
let response = await fetch(url, {
|
|
301
302
|
method: 'GET',
|