@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.global.js
CHANGED
|
@@ -1087,13 +1087,15 @@ var AzzasTracker = (() => {
|
|
|
1087
1087
|
"checkout": "https://secure.offpremium.com.br"
|
|
1088
1088
|
},
|
|
1089
1089
|
"carolbassi": {
|
|
1090
|
-
"store": "https://carolbassi.myvtex.com"
|
|
1090
|
+
"store": "https://carolbassi.myvtex.com",
|
|
1091
|
+
"checkout": "https://secure.carolbassi.com.br"
|
|
1091
1092
|
},
|
|
1092
1093
|
"bynv": {
|
|
1093
1094
|
"store": "https://bynv.myvtex.com"
|
|
1094
1095
|
},
|
|
1095
1096
|
"lojafabula": {
|
|
1096
|
-
"store": "https://lojafabula.myvtex.com"
|
|
1097
|
+
"store": "https://lojafabula.myvtex.com",
|
|
1098
|
+
"checkout": "https://secure.lojafabula.com.br"
|
|
1097
1099
|
}
|
|
1098
1100
|
};
|
|
1099
1101
|
async function getUserInfo(context) {
|
|
@@ -2023,10 +2025,13 @@ var AzzasTracker = (() => {
|
|
|
2023
2025
|
total_discount: (context) => {
|
|
2024
2026
|
var _a, _b, _c;
|
|
2025
2027
|
if (context == null ? void 0 : context.total_discount) return context.total_discount;
|
|
2026
|
-
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2029
|
-
|
|
2028
|
+
const orderForm = context == null ? void 0 : context.orderForm;
|
|
2029
|
+
const items = orderForm == null ? void 0 : orderForm.items;
|
|
2030
|
+
if (!(items == null ? void 0 : items.length) || typeof (orderForm == null ? void 0 : orderForm.value) !== "number") return null;
|
|
2031
|
+
const itemsFullValue = items.reduce((acc, item) => acc + item.listPrice * item.quantity, 0);
|
|
2032
|
+
const shipping = (_c = (_b = (_a = orderForm == null ? void 0 : orderForm.totalizers) == null ? void 0 : _a.find((t) => t.id === "Shipping")) == null ? void 0 : _b.value) != null ? _c : 0;
|
|
2033
|
+
const derived = itemsFullValue + shipping - orderForm.value;
|
|
2034
|
+
return derived > 0 ? derived / 100 : null;
|
|
2030
2035
|
},
|
|
2031
2036
|
subtotal: (context) => {
|
|
2032
2037
|
var _a, _b;
|