@nuskin/ns-shop 7.1.8 → 7.1.9
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
|
@@ -137,9 +137,10 @@ const populateItem = (order, salesOrder, shipImmediate, includeSapItems) => {
|
|
|
137
137
|
|
|
138
138
|
const populateAttribution = (salesOrder) => {
|
|
139
139
|
const sponsorId = util.getSponsorId();
|
|
140
|
+
const enableGuestCheckout = getCachedConfigField('enableGuestCheckout');
|
|
140
141
|
|
|
141
142
|
if (sponsorId) {
|
|
142
|
-
if (sponsorId.match(/^[A-Z]{2,3}(:?\d{7
|
|
143
|
+
if (sponsorId.match(/^[A-Z]{2,3}(:?\d{7,8})$/)) {
|
|
143
144
|
salesOrder.Shipping.ShippingParty.push({
|
|
144
145
|
Type: "RTL_SELLER",
|
|
145
146
|
ShippingMemberID: sponsorId,
|
|
@@ -149,7 +150,7 @@ const populateAttribution = (salesOrder) => {
|
|
|
149
150
|
} else {
|
|
150
151
|
console.error('Invalid sponsorId', sponsorId);
|
|
151
152
|
}
|
|
152
|
-
} else {
|
|
153
|
+
} else if(enableGuestCheckout) {
|
|
153
154
|
const guestSponsorId = UserService.getUser();
|
|
154
155
|
if(guestSponsorId.sponsorId == 'RETFLOAT' || guestSponsorId.sponsorId == 'NSHOUSE'){
|
|
155
156
|
salesOrder.Shipping.ShippingParty.push({
|