@azzas/azzas-tracker-web 2.0.1-preview.1 → 2.0.1
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/dist/mod.cjs +11 -6
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.global.js +11 -6
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +11 -6
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +17 -9
- package/package.json +1 -1
package/dist/mod.vtex.global.js
CHANGED
|
@@ -2171,13 +2171,15 @@ var AzzasTracker = function() {
|
|
|
2171
2171
|
"checkout": "https://secure.offpremium.com.br"
|
|
2172
2172
|
},
|
|
2173
2173
|
"carolbassi": {
|
|
2174
|
-
"store": "https://carolbassi.myvtex.com"
|
|
2174
|
+
"store": "https://carolbassi.myvtex.com",
|
|
2175
|
+
"checkout": "https://secure.carolbassi.com.br"
|
|
2175
2176
|
},
|
|
2176
2177
|
"bynv": {
|
|
2177
2178
|
"store": "https://bynv.myvtex.com"
|
|
2178
2179
|
},
|
|
2179
2180
|
"lojafabula": {
|
|
2180
|
-
"store": "https://lojafabula.myvtex.com"
|
|
2181
|
+
"store": "https://lojafabula.myvtex.com",
|
|
2182
|
+
"checkout": "https://secure.lojafabula.com.br"
|
|
2181
2183
|
}
|
|
2182
2184
|
};
|
|
2183
2185
|
// src/params/legacy/index.ts
|
|
@@ -3149,14 +3151,20 @@ var AzzasTracker = function() {
|
|
|
3149
3151
|
},
|
|
3150
3152
|
payment_type: getPaymentType2,
|
|
3151
3153
|
total_discount: function(context) {
|
|
3152
|
-
var
|
|
3154
|
+
var _ref;
|
|
3155
|
+
var _orderForm_totalizers_find, _orderForm_totalizers;
|
|
3153
3156
|
if (context === null || context === void 0 ? void 0 : context.total_discount) return context.total_discount;
|
|
3154
|
-
|
|
3155
|
-
var
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3157
|
+
var orderForm = context === null || context === void 0 ? void 0 : context.orderForm;
|
|
3158
|
+
var items = orderForm === null || orderForm === void 0 ? void 0 : orderForm.items;
|
|
3159
|
+
if (!(items === null || items === void 0 ? void 0 : items.length) || typeof (orderForm === null || orderForm === void 0 ? void 0 : orderForm.value) !== "number") return null;
|
|
3160
|
+
var itemsFullValue = items.reduce(function(acc, item) {
|
|
3161
|
+
return acc + item.listPrice * item.quantity;
|
|
3162
|
+
}, 0);
|
|
3163
|
+
var shipping = (_ref = orderForm === null || orderForm === void 0 ? void 0 : (_orderForm_totalizers = orderForm.totalizers) === null || _orderForm_totalizers === void 0 ? void 0 : (_orderForm_totalizers_find = _orderForm_totalizers.find(function(t) {
|
|
3164
|
+
return t.id === "Shipping";
|
|
3165
|
+
})) === null || _orderForm_totalizers_find === void 0 ? void 0 : _orderForm_totalizers_find.value) !== null && _ref !== void 0 ? _ref : 0;
|
|
3166
|
+
var derived = itemsFullValue + shipping - orderForm.value;
|
|
3167
|
+
return derived > 0 ? derived / 100 : null;
|
|
3160
3168
|
},
|
|
3161
3169
|
subtotal: function(context) {
|
|
3162
3170
|
var _context_orderForm, _context_orderForm1;
|