flowrix 1.0.1-beta.106 → 1.0.1-beta.108
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/module.json +1 -1
- package/dist/module.mjs +60 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.js +8 -6
- package/dist/runtime/composables/Product/useProductComponent.js +80 -0
- package/dist/runtime/composables/useApp.js +1 -1
- package/dist/runtime/composables/useMetaLayer.js +10 -10
- package/dist/runtime/composables/useTikTokDatalayer.js +7 -7
- package/dist/runtime/server/api/generate/sitemap.get.js +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -337,6 +337,66 @@ const module$1 = defineNuxtModule({
|
|
|
337
337
|
route: "/sitemap.xml",
|
|
338
338
|
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
339
339
|
});
|
|
340
|
+
addServerHandler({
|
|
341
|
+
route: "/sitemap.xml.gz",
|
|
342
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
343
|
+
});
|
|
344
|
+
addServerHandler({
|
|
345
|
+
route: "/brands-sitemap.xml",
|
|
346
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
347
|
+
});
|
|
348
|
+
addServerHandler({
|
|
349
|
+
route: "/brands-sitemap.xml.gz",
|
|
350
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
351
|
+
});
|
|
352
|
+
addServerHandler({
|
|
353
|
+
route: "/post-categories-sitemap.xml",
|
|
354
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
355
|
+
});
|
|
356
|
+
addServerHandler({
|
|
357
|
+
route: "/post-categories-sitemap.xml.gz",
|
|
358
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
359
|
+
});
|
|
360
|
+
addServerHandler({
|
|
361
|
+
route: "/services-sitemap.xml",
|
|
362
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
363
|
+
});
|
|
364
|
+
addServerHandler({
|
|
365
|
+
route: "/services-sitemap.xml.gz",
|
|
366
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
367
|
+
});
|
|
368
|
+
addServerHandler({
|
|
369
|
+
route: "/pages-sitemap.xml",
|
|
370
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
371
|
+
});
|
|
372
|
+
addServerHandler({
|
|
373
|
+
route: "/pages-sitemap.xml.gz",
|
|
374
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
375
|
+
});
|
|
376
|
+
addServerHandler({
|
|
377
|
+
route: "/products-sitemap.xml",
|
|
378
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
379
|
+
});
|
|
380
|
+
addServerHandler({
|
|
381
|
+
route: "/products-sitemap.xml.gz",
|
|
382
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
383
|
+
});
|
|
384
|
+
addServerHandler({
|
|
385
|
+
route: "/posts-sitemap.xml",
|
|
386
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
387
|
+
});
|
|
388
|
+
addServerHandler({
|
|
389
|
+
route: "/posts-sitemap.xml.gz",
|
|
390
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
391
|
+
});
|
|
392
|
+
addServerHandler({
|
|
393
|
+
route: "/categories-sitemap.xml",
|
|
394
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
395
|
+
});
|
|
396
|
+
addServerHandler({
|
|
397
|
+
route: "/categories-sitemap.xml.gz",
|
|
398
|
+
handler: resolver.resolve("./runtime/server/api/generate/sitemap.get")
|
|
399
|
+
});
|
|
340
400
|
addServerHandler({
|
|
341
401
|
route: "/robots.txt",
|
|
342
402
|
handler: resolver.resolve("./runtime/server/api/generate/robots.get")
|
|
@@ -5,18 +5,18 @@ import { META_add_payment_info } from "../../useMetaLayer.js";
|
|
|
5
5
|
import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
|
|
6
6
|
export default function() {
|
|
7
7
|
const checkoutStore = useCheckoutStore();
|
|
8
|
-
const getpaymentMethod = async (paymentMethod,
|
|
8
|
+
const getpaymentMethod = async (paymentMethod, inputData2, totalPrice) => {
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
inputData2.paymentmethod = paymentMethod;
|
|
11
11
|
const newPrice = parseFloat(totalPrice);
|
|
12
12
|
if (paymentMethod == "web-eway") {
|
|
13
13
|
await checkoutStore.paymentMethods({
|
|
14
14
|
paymentmethod: paymentMethod,
|
|
15
15
|
total: newPrice
|
|
16
16
|
});
|
|
17
|
-
|
|
17
|
+
inputData2.ewayKey = checkoutStore.publishableKey.key;
|
|
18
18
|
}
|
|
19
|
-
checkoutStore.saveToCheckoutSession(
|
|
19
|
+
checkoutStore.saveToCheckoutSession(inputData2);
|
|
20
20
|
const cartData = useCartStore().cart;
|
|
21
21
|
GTM_add_payment_info(cartData, "Eway");
|
|
22
22
|
META_add_payment_info(cartData, "Eway");
|
|
@@ -25,8 +25,8 @@ export default function() {
|
|
|
25
25
|
console.log("Error", error);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
function saveToCheckoutSession(
|
|
29
|
-
checkoutStore.saveToCheckoutSession(
|
|
28
|
+
function saveToCheckoutSession(inputData2) {
|
|
29
|
+
checkoutStore.saveToCheckoutSession(inputData2);
|
|
30
30
|
}
|
|
31
31
|
function eWayCardValidations() {
|
|
32
32
|
const e = document.getElementById("EWAY_CARDNUMBER");
|
|
@@ -78,6 +78,8 @@ export default function() {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
e.value = finalValue;
|
|
81
|
+
inputData.ewaeway_expiryyearyKey = finalValue;
|
|
82
|
+
checkoutStore.saveToCheckoutSession(inputData);
|
|
81
83
|
});
|
|
82
84
|
const ChangeCard = ((token = "") => {
|
|
83
85
|
checkoutStore.checkoutSession.fields.eway_cvn = "";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { defineAsyncComponent } from "vue";
|
|
2
|
+
import { useHead } from "#imports";
|
|
2
3
|
import { GTM_view_item } from "../useDataLayer.js";
|
|
3
4
|
import { META_view_item } from "../useMetaLayer.js";
|
|
4
5
|
import { TikTok_view_item } from "../useTikTokDatalayer.js";
|
|
6
|
+
import { useCompanyProfile } from "../../stores/useCompanyProfile.js";
|
|
5
7
|
export function useProductComponent(product) {
|
|
6
8
|
const templateName = "Template-" + product.template;
|
|
9
|
+
const companyProfile = useCompanyProfile();
|
|
7
10
|
const components = import.meta.glob(
|
|
8
11
|
"~/components/Product/Template*/index.vue"
|
|
9
12
|
);
|
|
@@ -18,6 +21,83 @@ export function useProductComponent(product) {
|
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
});
|
|
24
|
+
const ifPromotioned = () => {
|
|
25
|
+
if (product.rpfloat > product.pricefloat) {
|
|
26
|
+
return {
|
|
27
|
+
"priceSpecification": [
|
|
28
|
+
{
|
|
29
|
+
"@type": "UnitPriceSpecification",
|
|
30
|
+
"price": product.rpfloat,
|
|
31
|
+
"priceCurrency": companyProfile.profile?.data?.currencyCode || "",
|
|
32
|
+
"priceComponentType": "https://schema.org/ListPrice"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return [];
|
|
38
|
+
};
|
|
39
|
+
if (product?.faqs?.length) {
|
|
40
|
+
const faqSchema = {
|
|
41
|
+
"@context": "https://schema.org",
|
|
42
|
+
"@type": "FAQPage",
|
|
43
|
+
"name": `${product.name} - FAQs`,
|
|
44
|
+
"mainEntity": product?.faqs.map((faq) => ({
|
|
45
|
+
"@type": "Question",
|
|
46
|
+
"name": faq.question,
|
|
47
|
+
"acceptedAnswer": {
|
|
48
|
+
"@type": "Answer",
|
|
49
|
+
"text": faq.answer.replace(/<\/?p>/g, "")
|
|
50
|
+
// remove <p> tags
|
|
51
|
+
}
|
|
52
|
+
}))
|
|
53
|
+
};
|
|
54
|
+
useHead({
|
|
55
|
+
script: [
|
|
56
|
+
{
|
|
57
|
+
type: "application/ld+json",
|
|
58
|
+
id: "faq-schema",
|
|
59
|
+
children: JSON.stringify(faqSchema)
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
useHead({
|
|
65
|
+
meta: [
|
|
66
|
+
{
|
|
67
|
+
name: "robots",
|
|
68
|
+
content: product?.robots || ""
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
script: [
|
|
72
|
+
{
|
|
73
|
+
type: "application/ld+json",
|
|
74
|
+
id: "product-schema",
|
|
75
|
+
children: JSON.stringify({
|
|
76
|
+
"@context": "https://schema.org/",
|
|
77
|
+
"@type": "Product",
|
|
78
|
+
"name": product.name || "",
|
|
79
|
+
"image": [
|
|
80
|
+
product.image || ""
|
|
81
|
+
],
|
|
82
|
+
"description": product.description || "",
|
|
83
|
+
"sku": product.sku || "",
|
|
84
|
+
"brand": {
|
|
85
|
+
"@type": "Brand",
|
|
86
|
+
"name": product.brand || ""
|
|
87
|
+
},
|
|
88
|
+
"offers": {
|
|
89
|
+
"@type": "Offer",
|
|
90
|
+
"url": "https://iseekblinds.com.au/shop",
|
|
91
|
+
"priceCurrency": companyProfile.profile?.data?.currencyCode || "",
|
|
92
|
+
"price": product.pricefloat || "",
|
|
93
|
+
"availability": "https://schema.org/InStock",
|
|
94
|
+
"itemCondition": "https://schema.org/NewCondition",
|
|
95
|
+
...ifPromotioned()
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
});
|
|
21
101
|
GTM_view_item(product, product.rrpfloat, product.rpfloat);
|
|
22
102
|
META_view_item(product, product.rrpfloat, product.rpfloat);
|
|
23
103
|
TikTok_view_item(product, product.rrpfloat, product.rpfloat);
|
|
@@ -45,7 +45,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
|
45
45
|
children: JSON.stringify({
|
|
46
46
|
"@context": "https://schema.org",
|
|
47
47
|
"@type": "WebSite",
|
|
48
|
-
"url":
|
|
48
|
+
"url": websiteurl,
|
|
49
49
|
"name": sitename,
|
|
50
50
|
"alternateName": meta_title,
|
|
51
51
|
"description": meta_description,
|
|
@@ -11,7 +11,7 @@ export function META_page_view(to) {
|
|
|
11
11
|
fbq("trackCustom", "virtualPageView", {
|
|
12
12
|
content_type: "virtualPageView",
|
|
13
13
|
content_name: to.meta?.head?.meta_title,
|
|
14
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
14
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -25,7 +25,7 @@ export function META_view_item(product, price = 0, rp = 0) {
|
|
|
25
25
|
content_name: product.name,
|
|
26
26
|
discount,
|
|
27
27
|
value: price,
|
|
28
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
28
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -58,7 +58,7 @@ export function META_view_item_list(listItems = []) {
|
|
|
58
58
|
contents: ecomarceItems,
|
|
59
59
|
content_type: "Items List",
|
|
60
60
|
value: 0,
|
|
61
|
-
currency: useCompanyProfile().profile?.currencyCode || "GBP"
|
|
61
|
+
currency: useCompanyProfile().profile?.data?.currencyCode || "GBP"
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
} catch (err) {
|
|
@@ -75,7 +75,7 @@ export function META_add_to_cart(lastitem = null) {
|
|
|
75
75
|
content_name: lastitem.name,
|
|
76
76
|
discount,
|
|
77
77
|
value: lastitem.pricefloat,
|
|
78
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
78
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -102,7 +102,7 @@ export function META_remove_from_cart(lastitem = null) {
|
|
|
102
102
|
contents: ecomarceCartItems,
|
|
103
103
|
content_type: "Items List",
|
|
104
104
|
value: lastitem?.pricefloat,
|
|
105
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
105
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -132,7 +132,7 @@ export function META_view_cart(cart = null) {
|
|
|
132
132
|
contents: ecomarceCartItems,
|
|
133
133
|
content_type: "View Cart",
|
|
134
134
|
value: cart.totals.total,
|
|
135
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
135
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -161,7 +161,7 @@ export function META_begin_checkout(cart = null) {
|
|
|
161
161
|
contents: ecomarceCartItems,
|
|
162
162
|
content_type: "Checkout",
|
|
163
163
|
value: cart.totals.total,
|
|
164
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
164
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
}
|
|
@@ -194,7 +194,7 @@ export function META_add_shipping_info(cart = null, shipping_tier = null) {
|
|
|
194
194
|
contents: ecomarceCartItems,
|
|
195
195
|
content_type: shipping_tier?.title || "Shipping",
|
|
196
196
|
value: cart.totals.total,
|
|
197
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
197
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -223,7 +223,7 @@ export function META_add_payment_info(cart = null, payment_type = "") {
|
|
|
223
223
|
contents: ecomarceCartItems,
|
|
224
224
|
content_type: payment_type || "Payment",
|
|
225
225
|
value: cart.totals.total,
|
|
226
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
226
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
}
|
|
@@ -257,7 +257,7 @@ export function META_purchase(orderData = null, cart = null) {
|
|
|
257
257
|
tax: orderData.tax,
|
|
258
258
|
shipping: orderData.shipping,
|
|
259
259
|
coupon: orderData.vouchercode,
|
|
260
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
260
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
}
|
|
@@ -24,7 +24,7 @@ export function TikTok_view_item(product, price = 0, rp = 0) {
|
|
|
24
24
|
description: product?.category,
|
|
25
25
|
content_name: product?.name,
|
|
26
26
|
price: Number(rp) > 0 ? Number(rp) : Number(price),
|
|
27
|
-
currency: useCompanyProfile().profile?.currencyCode,
|
|
27
|
+
currency: useCompanyProfile().profile?.data?.currencyCode,
|
|
28
28
|
value: price
|
|
29
29
|
}]
|
|
30
30
|
});
|
|
@@ -46,7 +46,7 @@ export function TikTok_add_to_cart(lastitem = "") {
|
|
|
46
46
|
ttq.track("AddToCart", {
|
|
47
47
|
contents: ecomarceCartItems,
|
|
48
48
|
value: price,
|
|
49
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
49
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
export function TikTok_view_cart(cart = "") {
|
|
@@ -68,7 +68,7 @@ export function TikTok_view_cart(cart = "") {
|
|
|
68
68
|
ttq.track("ViewCart", {
|
|
69
69
|
contents: ecomarceCartItems,
|
|
70
70
|
value: cart.totals.total,
|
|
71
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
71
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
export function TikTok_remove_from_cart(lastitem = "") {
|
|
@@ -88,7 +88,7 @@ export function TikTok_remove_from_cart(lastitem = "") {
|
|
|
88
88
|
ttq.track("RemoveFromCart", {
|
|
89
89
|
contents: ecomarceCartItems,
|
|
90
90
|
value: price,
|
|
91
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
91
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
export function TikTok_begin_checkout(cart = "") {
|
|
@@ -110,7 +110,7 @@ export function TikTok_begin_checkout(cart = "") {
|
|
|
110
110
|
ttq.track("InitiateCheckout", {
|
|
111
111
|
contents: ecomarceCartItems,
|
|
112
112
|
value: cart.totals.total,
|
|
113
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
113
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
export function TikTok_add_payment_info(cart = "", payment_type = "") {
|
|
@@ -133,7 +133,7 @@ export function TikTok_add_payment_info(cart = "", payment_type = "") {
|
|
|
133
133
|
contents: ecomarceCartItems,
|
|
134
134
|
payment_type,
|
|
135
135
|
value: cart.totals.total,
|
|
136
|
-
currency: useCompanyProfile().profile?.currencyCode
|
|
136
|
+
currency: useCompanyProfile().profile?.data?.currencyCode
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
export function TikTok_purchase(orderData = "", cart = "") {
|
|
@@ -155,7 +155,7 @@ export function TikTok_purchase(orderData = "", cart = "") {
|
|
|
155
155
|
ttq.track("Purchase", {
|
|
156
156
|
contents: purchaseitems,
|
|
157
157
|
value: orderData.grandtotalFloat,
|
|
158
|
-
currency: useCompanyProfile().profile?.currencyCode,
|
|
158
|
+
currency: useCompanyProfile().profile?.data?.currencyCode,
|
|
159
159
|
transaction_id: orderData.order_no,
|
|
160
160
|
affiliation: "online Store",
|
|
161
161
|
tax: orderData.tax,
|
|
@@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
|
|
|
13
13
|
}
|
|
14
14
|
const isGzip = fullPath.endsWith(".gz");
|
|
15
15
|
const config = useRuntimeConfig();
|
|
16
|
-
const cdnUrl = config.FLOWRIX_CDN + "
|
|
16
|
+
const cdnUrl = config.FLOWRIX_CDN + "sitemaps/" + fullPath;
|
|
17
17
|
const buffer = await $fetch(cdnUrl, { responseType: "arrayBuffer" });
|
|
18
18
|
const data = Buffer.from(buffer);
|
|
19
19
|
if (isGzip) {
|