flowrix 1.0.1-beta.12 → 1.0.1-beta.120
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.d.mts +1 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +170 -30
- package/dist/runtime/composables/Blog/useBlogIndex.d.ts +2 -5
- package/dist/runtime/composables/Blog/useBlogSingle.js +2 -4
- package/dist/runtime/composables/Brand/brand.js +2 -0
- package/dist/runtime/composables/Cart/useCart.d.ts +40 -0
- package/dist/runtime/composables/Cart/useCart.js +10 -0
- package/dist/runtime/composables/Cart/useCartComponent.d.ts +1 -0
- package/dist/runtime/composables/Cart/useCartComponent.js +11 -0
- package/dist/runtime/composables/Cart/useCartDetail.d.ts +15 -5
- package/dist/runtime/composables/Cart/useCartDetail.js +3 -0
- package/dist/runtime/composables/Category/useCategoryIndex.d.ts +25 -32
- package/dist/runtime/composables/Category/useCategoryIndex.js +56 -44
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.js +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.js +16 -6
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +10 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +10 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +3 -14
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.js +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +2 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.js +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.js +8 -0
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +85 -73
- package/dist/runtime/composables/Checkout/useCheckout.js +84 -53
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +43 -0
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.js +84 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +55 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.js +196 -0
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +7 -7
- package/dist/runtime/composables/Checkout/useCreateAccount.js +3 -1
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +2 -2
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +18 -11
- package/dist/runtime/composables/Customer/useBillingAddress.d.ts +112 -0
- package/dist/runtime/composables/Customer/useBillingAddress.js +93 -0
- package/dist/runtime/composables/Customer/useLogin.d.ts +9 -0
- package/dist/runtime/composables/Customer/useLogin.js +34 -0
- package/dist/runtime/composables/Customer/useOrders.d.ts +29 -0
- package/dist/runtime/composables/Customer/useOrders.js +56 -0
- package/dist/runtime/composables/Customer/usePasswordReset.d.ts +26 -0
- package/dist/runtime/composables/Customer/usePasswordReset.js +258 -0
- package/dist/runtime/composables/Customer/useProfile.d.ts +75 -0
- package/dist/runtime/composables/Customer/useProfile.js +106 -0
- package/dist/runtime/composables/Customer/useQuotations.d.ts +32 -0
- package/dist/runtime/composables/Customer/useQuotations.js +40 -0
- package/dist/runtime/composables/Customer/useRegister.d.ts +121 -13
- package/dist/runtime/composables/Customer/useRegister.js +310 -35
- package/dist/runtime/composables/Customer/useShippingAddress.d.ts +121 -0
- package/dist/runtime/composables/Customer/useShippingAddress.js +145 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +21 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.js +130 -0
- package/dist/runtime/composables/Customer/useUserCards.d.ts +22 -0
- package/dist/runtime/composables/Customer/useUserCards.js +65 -0
- package/dist/runtime/composables/{useWishlists.d.ts → Customer/useWishlists.d.ts} +6 -19
- package/dist/runtime/composables/{useWishlists.js → Customer/useWishlists.js} +21 -29
- package/dist/runtime/composables/Extras/useCountry.d.ts +11 -6
- package/dist/runtime/composables/Extras/useCountry.js +5 -4
- package/dist/runtime/composables/Header/useHeader.d.ts +6 -20
- package/dist/runtime/composables/Header/useHeader.js +3 -2
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.js +4 -5
- package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +1 -1
- package/dist/runtime/composables/Product/useProductComponent.js +110 -0
- package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -1
- package/dist/runtime/composables/Product/useQuickView.d.ts +8 -0
- package/dist/runtime/composables/Product/useQuickView.js +27 -0
- package/dist/runtime/composables/Product/useService.d.ts +1 -1
- package/dist/runtime/composables/Product/useService.js +0 -3
- package/dist/runtime/composables/Samples/useSamples.js +1 -1
- package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +2 -2
- package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +2 -2
- package/dist/runtime/composables/index.d.ts +18 -12
- package/dist/runtime/composables/index.js +18 -12
- package/dist/runtime/composables/useAddresses.js +6 -6
- package/dist/runtime/composables/useApp.d.ts +1 -0
- package/dist/runtime/composables/useApp.js +85 -0
- package/dist/runtime/composables/useCards.js +2 -2
- package/dist/runtime/composables/useDataLayer.js +1 -1
- package/dist/runtime/composables/useDotDigital.d.ts +3 -0
- package/dist/runtime/composables/useDotDigital.js +122 -0
- package/dist/runtime/composables/useLocation.d.ts +2 -12
- package/dist/runtime/composables/useMetaLayer.js +11 -11
- package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
- package/dist/runtime/composables/useQuotationCheckout.js +137 -0
- package/dist/runtime/composables/useSubscriptions.d.ts +17 -10
- package/dist/runtime/composables/useSubscriptions.js +68 -33
- package/dist/runtime/composables/useTikTokDatalayer.js +7 -7
- package/dist/runtime/composables/useWebforms.d.ts +38 -9
- package/dist/runtime/composables/useWebforms.js +93 -60
- package/dist/runtime/middleware/flowrix.d.ts +5 -4
- package/dist/runtime/middleware/flowrix.js +40 -21
- package/dist/runtime/pages/404.d.vue.ts +3 -0
- package/dist/runtime/pages/404.vue +6 -0
- package/dist/runtime/pages/404.vue.d.ts +3 -0
- package/dist/runtime/pages/flowrix-default.d.vue.ts +3 -0
- package/dist/runtime/pages/flowrix-default.vue +43 -0
- package/dist/runtime/pages/flowrix-default.vue.d.ts +3 -0
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/plugins/router.d.ts +2 -0
- package/dist/runtime/plugins/router.js +11 -0
- package/dist/runtime/server/api/albums.d.ts +1 -0
- package/dist/runtime/server/api/albums.js +35 -7
- package/dist/runtime/server/api/auth/forgot.js +1 -2
- package/dist/runtime/server/api/auth/login.d.ts +7 -0
- package/dist/runtime/server/api/auth/login.js +4 -16
- package/dist/runtime/server/api/auth/logout.js +1 -2
- package/dist/runtime/server/api/auth/register.js +1 -2
- package/dist/runtime/server/api/auth/session.get.js +1 -3
- package/dist/runtime/server/api/auth/user/reset-password.js +1 -2
- package/dist/runtime/server/api/auth/user/session.js +1 -2
- package/dist/runtime/server/api/auth/user/verify-token.js +1 -2
- package/dist/runtime/server/api/banners.js +20 -15
- package/dist/runtime/server/api/brand/[...slug].js +55 -0
- package/dist/runtime/server/api/brand/index.d.ts +3 -0
- package/dist/runtime/server/api/brand/index.js +46 -0
- package/dist/runtime/server/api/cache/[...slug].delete.d.ts +4 -1
- package/dist/runtime/server/api/cache/[...slug].delete.js +4 -7
- package/dist/runtime/server/api/cache/clean.get.d.ts +5 -0
- package/dist/runtime/server/api/cache/clean.get.js +4 -7
- package/dist/runtime/server/api/cart/[slug]/add.d.ts +1 -1
- package/dist/runtime/server/api/cart/[slug]/add.js +11 -11
- package/dist/runtime/server/api/cart/[slug]/update.d.ts +1 -1
- package/dist/runtime/server/api/cart/[slug]/update.js +11 -11
- package/dist/runtime/server/api/{v2/[...slug].d.ts → cart/related.d.ts} +0 -1
- package/dist/runtime/server/api/cart/related.js +21 -0
- package/dist/runtime/server/api/cart/remove.d.ts +1 -1
- package/dist/runtime/server/api/cart/remove.js +10 -10
- package/dist/runtime/server/api/cart/service/[slug]/add.d.ts +1 -1
- package/dist/runtime/server/api/cart/service/[slug]/add.js +12 -12
- package/dist/runtime/server/api/catalog/brands.d.ts +3 -0
- package/dist/runtime/server/api/catalog/brands.js +52 -0
- package/dist/runtime/server/api/catalog/categories.js +28 -19
- package/dist/runtime/server/api/catalog/categoriesall.d.ts +3 -0
- package/dist/runtime/server/api/catalog/categoriesall.js +52 -0
- package/dist/runtime/server/api/catalog/featured.js +28 -17
- package/dist/runtime/server/api/catalog/posts.d.ts +3 -0
- package/dist/runtime/server/api/catalog/posts.js +52 -0
- package/dist/runtime/server/api/catalog/samples.js +28 -19
- package/dist/runtime/server/api/catalog/search.js +28 -19
- package/dist/runtime/server/api/category/[...slug].js +30 -20
- package/dist/runtime/server/api/check-404.d.ts +4 -0
- package/dist/runtime/server/api/check-404.js +8 -0
- package/dist/runtime/server/api/checkout/applyCoupon.d.ts +1 -1
- package/dist/runtime/server/api/checkout/applyCoupon.js +13 -13
- package/dist/runtime/server/api/checkout/configs.d.ts +1 -1
- package/dist/runtime/server/api/checkout/configs.js +11 -11
- package/dist/runtime/server/api/checkout/countries.d.ts +1 -1
- package/dist/runtime/server/api/checkout/countries.js +5 -9
- package/dist/runtime/server/api/checkout/paymentmethod.d.ts +1 -1
- package/dist/runtime/server/api/checkout/paymentmethod.js +16 -11
- package/dist/runtime/server/api/{blog/blog.d.ts → checkout/quotation/[slug].d.ts} +0 -1
- package/dist/runtime/server/api/checkout/quotation/[slug].js +20 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].js +35 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.js +20 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].js +22 -0
- package/dist/runtime/server/api/checkvariables.d.ts +3 -0
- package/dist/runtime/server/api/checkvariables.js +35 -0
- package/dist/runtime/server/api/cmspost/[...slug].js +54 -0
- package/dist/runtime/server/api/cmspost/all.d.ts +3 -0
- package/dist/runtime/server/api/cmspost/all.js +52 -0
- package/dist/runtime/server/api/company/profile.d.ts +1 -1
- package/dist/runtime/server/api/company/profile.js +12 -7
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.d.ts +1 -1
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +50 -15
- package/dist/runtime/server/api/contact-center/webforms/create.d.ts +1 -1
- package/dist/runtime/server/api/contact-center/webforms/create.js +13 -9
- package/dist/runtime/server/api/countries.d.ts +2 -0
- package/dist/runtime/server/api/countries.js +44 -0
- package/dist/runtime/server/api/customer/address/add.js +1 -2
- package/dist/runtime/server/api/customer/address/delete.js +2 -3
- package/dist/runtime/server/api/customer/address/setshipping.js +1 -2
- package/dist/runtime/server/api/customer/address/update.js +1 -2
- package/dist/runtime/server/api/customer/cards/delete.js +2 -3
- package/dist/runtime/server/api/customer/cards/get.js +2 -3
- package/dist/runtime/server/api/customer/change-password.js +2 -3
- package/dist/runtime/server/api/customer/checkout.js +1 -2
- package/dist/runtime/server/api/customer/orders.js +2 -3
- package/dist/runtime/server/api/customer/profile/update.js +1 -2
- package/dist/runtime/server/api/customer/quotations.js +2 -3
- package/dist/runtime/server/api/customer/search.js +1 -2
- package/dist/runtime/server/api/customer/tax-invoice.js +1 -2
- package/dist/runtime/server/api/customer/wishlist/add.js +1 -2
- package/dist/runtime/server/api/customer/wishlist/createWishList.js +1 -2
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +1 -2
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +1 -2
- package/dist/runtime/server/api/customer/wishlist/get.js +2 -3
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +1 -2
- package/dist/runtime/server/api/customer/wishlist/updateWishList.js +2 -3
- package/dist/runtime/server/api/featured.d.ts +3 -0
- package/dist/runtime/server/api/featured.js +52 -0
- package/dist/runtime/server/api/generate/robots.get.d.ts +2 -0
- package/dist/runtime/server/api/generate/robots.get.js +20 -0
- package/dist/runtime/server/api/generate/sitemap.get.d.ts +2 -0
- package/dist/runtime/server/api/generate/sitemap.get.js +32 -0
- package/dist/runtime/server/api/location.d.ts +1 -1
- package/dist/runtime/server/api/location.js +24 -12
- package/dist/runtime/server/api/nav/[id]/links.d.ts +1 -0
- package/dist/runtime/server/api/nav/[id]/links.js +46 -10
- package/dist/runtime/server/api/page/[...slug].js +54 -0
- package/dist/runtime/server/api/product/[...slug].js +28 -13
- package/dist/runtime/server/api/quickview/[slug].d.ts +2 -0
- package/dist/runtime/server/api/quickview/[slug].js +21 -0
- package/dist/runtime/server/api/reviews.d.ts +2 -0
- package/dist/runtime/server/api/reviews.js +23 -0
- package/dist/runtime/server/api/samples.d.ts +3 -0
- package/dist/runtime/server/api/samples.js +53 -0
- package/dist/runtime/server/api/search.d.ts +3 -0
- package/dist/runtime/server/api/search.js +53 -0
- package/dist/runtime/server/api/service/[slug].js +22 -16
- package/dist/runtime/server/api/service/availability.d.ts +1 -1
- package/dist/runtime/server/api/service/availability.js +14 -12
- package/dist/runtime/server/api/service/getall.d.ts +3 -0
- package/dist/runtime/server/api/service/getall.js +57 -0
- package/dist/runtime/server/api/shop.d.ts +3 -0
- package/dist/runtime/server/api/shop.js +53 -0
- package/dist/runtime/server/api/subscribe.d.ts +1 -1
- package/dist/runtime/server/api/subscribe.js +23 -14
- package/dist/runtime/server/api/v2/[...slug].get.d.ts +2 -0
- package/dist/runtime/server/api/v2/[...slug].get.js +32 -0
- package/dist/runtime/server/api/webform.d.ts +3 -0
- package/dist/runtime/server/api/webform.js +54 -0
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/stores/Cart.d.ts +12 -0
- package/dist/runtime/stores/Cart.js +62 -17
- package/dist/runtime/stores/Checkout.d.ts +9 -15
- package/dist/runtime/stores/Checkout.js +24 -40
- package/dist/runtime/stores/Search.d.ts +1 -1
- package/dist/runtime/stores/Services.js +2 -2
- package/dist/runtime/stores/auth.d.ts +8 -11
- package/dist/runtime/stores/auth.js +385 -8
- package/dist/runtime/stores/countries.d.ts +1 -3
- package/dist/runtime/stores/countries.js +4 -8
- package/dist/runtime/stores/product/README.md +6 -6
- package/dist/runtime/stores/product/slug.d.ts +1 -17
- package/dist/runtime/stores/webforms.d.ts +24 -9
- package/dist/runtime/stores/webforms.js +105 -5
- package/dist/runtime/stores/wishlists.d.ts +114 -7
- package/dist/runtime/stores/wishlists.js +209 -15
- package/dist/runtime/utils/api.js +7 -13
- package/dist/runtime/utils/htmlCache.d.ts +2 -2
- package/dist/runtime/utils/htmlCache.js +23 -13
- package/dist/types.d.mts +6 -2
- package/package.json +15 -5
- package/dist/runtime/composables/Checkout/useBillingAddress.d.ts +0 -19
- package/dist/runtime/composables/Checkout/useBillingAddress.js +0 -82
- package/dist/runtime/composables/Checkout/useShippingAddress.d.ts +0 -9
- package/dist/runtime/composables/Checkout/useShippingAddress.js +0 -121
- package/dist/runtime/composables/useAuth.d.ts +0 -45
- package/dist/runtime/composables/useAuth.js +0 -180
- package/dist/runtime/composables/useCountries.d.ts +0 -12
- package/dist/runtime/composables/useCountries.js +0 -50
- package/dist/runtime/composables/useOrders.d.ts +0 -21
- package/dist/runtime/composables/useOrders.js +0 -82
- package/dist/runtime/composables/useQuotations.d.ts +0 -14
- package/dist/runtime/composables/useQuotations.js +0 -50
- package/dist/runtime/server/api/blog/[slug].js +0 -51
- package/dist/runtime/server/api/blog/blog.js +0 -17
- package/dist/runtime/server/api/brand/[slug].js +0 -58
- package/dist/runtime/server/api/page/[slug].js +0 -51
- package/dist/runtime/server/api/v2/[...slug].js +0 -9
- /package/dist/runtime/server/api/brand/{[slug].d.ts → [...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{blog/[slug].d.ts → cmspost/[...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/page/{[slug].d.ts → [...slug].d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default function (props: any): {
|
|
2
|
-
useCartStore: import("pinia").StoreDefinition<"cart", import("../../stores/
|
|
2
|
+
useCartStore: import("pinia").StoreDefinition<"cart", import("../../stores/Cart.js").CartState, {}, {}>;
|
|
3
3
|
ServiceStore: import("pinia").Store<"ServiceStore", {
|
|
4
4
|
services: never[];
|
|
5
5
|
availability: boolean;
|
|
@@ -2,7 +2,6 @@ import { ref, watch, onMounted, computed } from "vue";
|
|
|
2
2
|
import { useServiceStore } from "../../stores/Services.js";
|
|
3
3
|
import { useCartStore } from "../../stores/Cart.js";
|
|
4
4
|
import { useIpLocation } from "../../stores/IpLocation.js";
|
|
5
|
-
import LocationScript from "../Location";
|
|
6
5
|
export default function(props) {
|
|
7
6
|
const CurrentService = ref([]);
|
|
8
7
|
const ServiceStore = useServiceStore();
|
|
@@ -50,8 +49,6 @@ export default function(props) {
|
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
const GetServiceLocations = async () => {
|
|
53
|
-
const { GetLocation } = LocationScript.setup();
|
|
54
|
-
GetLocation();
|
|
55
52
|
};
|
|
56
53
|
return {
|
|
57
54
|
useCartStore,
|
|
@@ -12,7 +12,7 @@ export default function(props) {
|
|
|
12
12
|
() => import("@/components/Samples/Template01/TopBar.vue")
|
|
13
13
|
);
|
|
14
14
|
const SampleCard = defineAsyncComponent(
|
|
15
|
-
() => import("@/components/
|
|
15
|
+
() => import("@/components/Product/SampleProductCard.vue")
|
|
16
16
|
);
|
|
17
17
|
const Pagination = defineAsyncComponent(
|
|
18
18
|
() => import("@/components/Others/Pagination.vue")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default function (): {
|
|
2
|
-
route:
|
|
3
|
-
router:
|
|
2
|
+
route: any;
|
|
3
|
+
router: any;
|
|
4
4
|
isChecked: (slug: any, dynamicQueryParam: any) => any;
|
|
5
5
|
toggleCheckbox: (slug: any, parent_slug: any) => void;
|
|
6
6
|
};
|
|
@@ -7,17 +7,16 @@ export * from './Blog/useMagazineCard.js';
|
|
|
7
7
|
export * from './Blog/useSingleBlogMain.js';
|
|
8
8
|
export * from './Brand/brand.js';
|
|
9
9
|
export * from './Cart/useCartDetail.js';
|
|
10
|
+
export * from './Cart/useCartComponent.js';
|
|
10
11
|
export * from './Category/useCategoryContent.js';
|
|
11
12
|
export * from './Category/useCategoryGrid.js';
|
|
12
13
|
export * from './Category/useCategoryIndex.js';
|
|
13
|
-
export * from './Category/useCategoryTemplate2.js';
|
|
14
|
-
export * from './Category/useCategoryTemplate3.js';
|
|
15
14
|
export * from './Category/useCategoryTop.js';
|
|
16
|
-
export * from './Checkout/
|
|
15
|
+
export * from './Checkout/useCheckoutBillingAddress.js';
|
|
17
16
|
export * from './Checkout/useCheckout.js';
|
|
18
17
|
export * from './Checkout/useCreateAccount.js';
|
|
19
18
|
export * from './Checkout/useDeliveryMethod.js';
|
|
20
|
-
export * from './Checkout/
|
|
19
|
+
export * from './Checkout/useCheckoutShippingAddress.js';
|
|
21
20
|
export * from './Checkout/PaymentMethods/useDirectDeposit.js';
|
|
22
21
|
export * from './Checkout/PaymentMethods/useEway.js';
|
|
23
22
|
export * from './Checkout/PaymentMethods/useFlowrixpay.js';
|
|
@@ -27,6 +26,16 @@ export * from './Checkout/PaymentMethods/usePaypal.js';
|
|
|
27
26
|
export * from './Checkout/PaymentMethods/useStripe.js';
|
|
28
27
|
export * from './Checkout/PaymentMethods/useZippay.js';
|
|
29
28
|
export * from './Customer/useRegister.js';
|
|
29
|
+
export * from './Customer/useLogin.js';
|
|
30
|
+
export * from './Customer/useProfile.js';
|
|
31
|
+
export * from './Customer/useOrders.js';
|
|
32
|
+
export * from './Customer/useQuotations.js';
|
|
33
|
+
export * from './Customer/useBillingAddress.js';
|
|
34
|
+
export * from './Customer/useShippingAddress.js';
|
|
35
|
+
export * from './Customer/useUpdatePassword.js';
|
|
36
|
+
export * from './Customer/useUserCards.js';
|
|
37
|
+
export * from './Customer/useWishlists.js';
|
|
38
|
+
export * from './Customer/usePasswordReset.js';
|
|
30
39
|
export * from './Extras/useCountry.js';
|
|
31
40
|
export * from './Extras/useDateFormatter.js';
|
|
32
41
|
export * from './Extras/useNumberOnly.js';
|
|
@@ -55,20 +64,17 @@ export * from './SideBar/useSideBar.js';
|
|
|
55
64
|
export * from './SideBar/Filters/useFilters.js';
|
|
56
65
|
export * from './SideBar/Filters/useSorting.js';
|
|
57
66
|
export { useAddresses } from './useAddresses.js';
|
|
67
|
+
export { useQuickView } from './Product/useQuickView.js';
|
|
68
|
+
export { useSendQuickValues } from './Product/useQuickView.js';
|
|
58
69
|
export { useAddToCart } from './useAddToCart.js';
|
|
59
|
-
export { useAuth } from './useAuth.js';
|
|
60
70
|
export { useCards } from './useCards.js';
|
|
61
71
|
export { useClientApi } from './useClientApi.js';
|
|
62
|
-
export {
|
|
63
|
-
export { useDataLayer } from './useDataLayer.js';
|
|
72
|
+
export { GTM_page_view, GTM_view_item, GTM_view_item_list, GTM_view_cart, GTM_add_to_cart, GTM_remove_from_cart, GTM_begin_checkout, GTM_add_shipping_info, GTM_add_payment_info, GTM_purchase, GTM_select_item_color, GTM_select_item_collection, GTM_Attribute_Content } from './useDataLayer.js';
|
|
64
73
|
export { useDynamicHtmlRenderer } from './useDynamicHtmlRenderer.js';
|
|
65
74
|
export { useLocation } from './useLocation.js';
|
|
66
75
|
export { useLocations } from './useLocations.js';
|
|
67
|
-
export {
|
|
68
|
-
export { useOrders } from './useOrders.js';
|
|
69
|
-
export { useQuotations } from './useQuotations.js';
|
|
76
|
+
export { useQuotationCheckout } from './useQuotationCheckout.js';
|
|
70
77
|
export { useSearch } from './useSearch.js';
|
|
71
78
|
export { useSubscriptions } from './useSubscriptions.js';
|
|
72
|
-
export { useTikTokDatalayer } from './useTikTokDatalayer.js';
|
|
73
79
|
export { useWebforms } from './useWebforms.js';
|
|
74
|
-
export {
|
|
80
|
+
export { useApp } from './useApp.js';
|
|
@@ -7,17 +7,16 @@ export * from "./Blog/useMagazineCard.js";
|
|
|
7
7
|
export * from "./Blog/useSingleBlogMain.js";
|
|
8
8
|
export * from "./Brand/brand.js";
|
|
9
9
|
export * from "./Cart/useCartDetail.js";
|
|
10
|
+
export * from "./Cart/useCartComponent.js";
|
|
10
11
|
export * from "./Category/useCategoryContent.js";
|
|
11
12
|
export * from "./Category/useCategoryGrid.js";
|
|
12
13
|
export * from "./Category/useCategoryIndex.js";
|
|
13
|
-
export * from "./Category/useCategoryTemplate2";
|
|
14
|
-
export * from "./Category/useCategoryTemplate3";
|
|
15
14
|
export * from "./Category/useCategoryTop.js";
|
|
16
|
-
export * from "./Checkout/
|
|
15
|
+
export * from "./Checkout/useCheckoutBillingAddress.js";
|
|
17
16
|
export * from "./Checkout/useCheckout.js";
|
|
18
17
|
export * from "./Checkout/useCreateAccount.js";
|
|
19
18
|
export * from "./Checkout/useDeliveryMethod.js";
|
|
20
|
-
export * from "./Checkout/
|
|
19
|
+
export * from "./Checkout/useCheckoutShippingAddress.js";
|
|
21
20
|
export * from "./Checkout/PaymentMethods/useDirectDeposit.js";
|
|
22
21
|
export * from "./Checkout/PaymentMethods/useEway.js";
|
|
23
22
|
export * from "./Checkout/PaymentMethods/useFlowrixpay.js";
|
|
@@ -27,6 +26,16 @@ export * from "./Checkout/PaymentMethods/usePaypal.js";
|
|
|
27
26
|
export * from "./Checkout/PaymentMethods/useStripe.js";
|
|
28
27
|
export * from "./Checkout/PaymentMethods/useZippay.js";
|
|
29
28
|
export * from "./Customer/useRegister.js";
|
|
29
|
+
export * from "./Customer/useLogin.js";
|
|
30
|
+
export * from "./Customer/useProfile.js";
|
|
31
|
+
export * from "./Customer/useOrders.js";
|
|
32
|
+
export * from "./Customer/useQuotations.js";
|
|
33
|
+
export * from "./Customer/useBillingAddress.js";
|
|
34
|
+
export * from "./Customer/useShippingAddress.js";
|
|
35
|
+
export * from "./Customer/useUpdatePassword.js";
|
|
36
|
+
export * from "./Customer/useUserCards.js";
|
|
37
|
+
export * from "./Customer/useWishlists.js";
|
|
38
|
+
export * from "./Customer/usePasswordReset.js";
|
|
30
39
|
export * from "./Extras/useCountry.js";
|
|
31
40
|
export * from "./Extras/useDateFormatter.js";
|
|
32
41
|
export * from "./Extras/useNumberOnly.js";
|
|
@@ -55,20 +64,17 @@ export * from "./SideBar/useSideBar.js";
|
|
|
55
64
|
export * from "./SideBar/Filters/useFilters.js";
|
|
56
65
|
export * from "./SideBar/Filters/useSorting.js";
|
|
57
66
|
export { useAddresses } from "./useAddresses.js";
|
|
67
|
+
export { useQuickView } from "./Product/useQuickView.js";
|
|
68
|
+
export { useSendQuickValues } from "./Product/useQuickView.js";
|
|
58
69
|
export { useAddToCart } from "./useAddToCart.js";
|
|
59
|
-
export { useAuth } from "./useAuth.js";
|
|
60
70
|
export { useCards } from "./useCards.js";
|
|
61
71
|
export { useClientApi } from "./useClientApi.js";
|
|
62
|
-
export {
|
|
63
|
-
export { useDataLayer } from "./useDataLayer.js";
|
|
72
|
+
export { GTM_page_view, GTM_view_item, GTM_view_item_list, GTM_view_cart, GTM_add_to_cart, GTM_remove_from_cart, GTM_begin_checkout, GTM_add_shipping_info, GTM_add_payment_info, GTM_purchase, GTM_select_item_color, GTM_select_item_collection, GTM_Attribute_Content } from "./useDataLayer.js";
|
|
64
73
|
export { useDynamicHtmlRenderer } from "./useDynamicHtmlRenderer.js";
|
|
65
74
|
export { useLocation } from "./useLocation.js";
|
|
66
75
|
export { useLocations } from "./useLocations.js";
|
|
67
|
-
export {
|
|
68
|
-
export { useOrders } from "./useOrders.js";
|
|
69
|
-
export { useQuotations } from "./useQuotations.js";
|
|
76
|
+
export { useQuotationCheckout } from "./useQuotationCheckout.js";
|
|
70
77
|
export { useSearch } from "./useSearch.js";
|
|
71
78
|
export { useSubscriptions } from "./useSubscriptions.js";
|
|
72
|
-
export { useTikTokDatalayer } from "./useTikTokDatalayer.js";
|
|
73
79
|
export { useWebforms } from "./useWebforms.js";
|
|
74
|
-
export {
|
|
80
|
+
export { useApp } from "./useApp.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import { useAddressesStore } from "../stores/addresses.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useAuthStore } from "../stores/auth.js";
|
|
4
4
|
import { useApi } from "../utils/api.js";
|
|
5
5
|
function formatErrorMessage(message) {
|
|
6
6
|
if (!message) return "An error occurred";
|
|
@@ -19,14 +19,14 @@ function formatErrorMessage(message) {
|
|
|
19
19
|
}
|
|
20
20
|
export function useAddresses() {
|
|
21
21
|
const store = useAddressesStore();
|
|
22
|
-
const { fetchProfile } =
|
|
22
|
+
const { fetchProfile } = useAuthStore();
|
|
23
23
|
const { post, patch, delete: deleteRequest } = useApi();
|
|
24
24
|
async function addAddress(userData) {
|
|
25
25
|
store.setLoading(true);
|
|
26
26
|
store.setError(null);
|
|
27
27
|
try {
|
|
28
28
|
userData.shipping = 1;
|
|
29
|
-
const response = await post("/customer/address/add", userData);
|
|
29
|
+
const response = await post("/mystore/customer/address/add", userData);
|
|
30
30
|
if (response.status === "Success" && response.data) {
|
|
31
31
|
await fetchProfile();
|
|
32
32
|
return response;
|
|
@@ -48,7 +48,7 @@ export function useAddresses() {
|
|
|
48
48
|
store.setLoading(true);
|
|
49
49
|
store.setError(null);
|
|
50
50
|
try {
|
|
51
|
-
const response = await patch(`/customer/address/${userData.id}/update`, userData);
|
|
51
|
+
const response = await patch(`/mystore/customer/address/${userData.id}/update`, userData);
|
|
52
52
|
if (response.status === "Success" && response.data) {
|
|
53
53
|
await fetchProfile();
|
|
54
54
|
return response;
|
|
@@ -70,7 +70,7 @@ export function useAddresses() {
|
|
|
70
70
|
store.setLoading(true);
|
|
71
71
|
store.setError(null);
|
|
72
72
|
try {
|
|
73
|
-
const response = await patch(`/customer/address/${id}/delete`, {});
|
|
73
|
+
const response = await patch(`/mystore/customer/address/${id}/delete`, {});
|
|
74
74
|
if (response.status === "Success") {
|
|
75
75
|
await fetchProfile();
|
|
76
76
|
return response;
|
|
@@ -92,7 +92,7 @@ export function useAddresses() {
|
|
|
92
92
|
store.setLoading(true);
|
|
93
93
|
store.setError(null);
|
|
94
94
|
try {
|
|
95
|
-
const response = await post(`/customer/address/${addressId}/setshipping`, {});
|
|
95
|
+
const response = await post(`/mystore/customer/address/${addressId}/setshipping`, {});
|
|
96
96
|
if (response.status === "Success") {
|
|
97
97
|
await fetchProfile();
|
|
98
98
|
return response;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useApp: () => {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useHead, useRequestEvent, useRoute } from "#imports";
|
|
2
|
+
import { getRequestURL } from "h3";
|
|
3
|
+
import { useCompanyProfile } from "../stores/useCompanyProfile.js";
|
|
4
|
+
export const useApp = () => {
|
|
5
|
+
const route = useRoute();
|
|
6
|
+
const companyProfile = useCompanyProfile();
|
|
7
|
+
const gtmId = companyProfile.profile?.data?.integrations["google-tag-manager"]["script"] || "";
|
|
8
|
+
const tiktok = companyProfile.profile?.data?.integrations["tiktok"]["script"] || "";
|
|
9
|
+
const facebookMeta = companyProfile.profile?.data?.integrations["meta"]["script"] || "";
|
|
10
|
+
const sitename = companyProfile.profile?.data?.name || "";
|
|
11
|
+
const meta_title = companyProfile.profile?.data?.meta_title || "";
|
|
12
|
+
const meta_description = companyProfile.profile?.data?.meta_description || "";
|
|
13
|
+
const robots = companyProfile.profile?.data?.robots || "";
|
|
14
|
+
const logo = companyProfile.profile?.data?.logo || "";
|
|
15
|
+
let recaptcha = "";
|
|
16
|
+
if (companyProfile.profile?.data?.recaptcha) {
|
|
17
|
+
recaptcha = `https://www.google.com/recaptcha/api.js?render=${companyProfile.profile?.data?.recaptcha}`;
|
|
18
|
+
}
|
|
19
|
+
let websiteurl = "";
|
|
20
|
+
if (process.server) {
|
|
21
|
+
const event = useRequestEvent();
|
|
22
|
+
websiteurl = getRequestURL(event).origin;
|
|
23
|
+
} else {
|
|
24
|
+
websiteurl = window.location.origin;
|
|
25
|
+
}
|
|
26
|
+
useHead({
|
|
27
|
+
link: [
|
|
28
|
+
{
|
|
29
|
+
rel: "canonical",
|
|
30
|
+
href: `${websiteurl}${route.path}`
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
meta: [
|
|
34
|
+
{
|
|
35
|
+
name: "robots",
|
|
36
|
+
content: robots
|
|
37
|
+
},
|
|
38
|
+
{ property: "og:title", content: meta_title },
|
|
39
|
+
{ property: "og:description", content: meta_description },
|
|
40
|
+
{ property: "og:type", content: "website" },
|
|
41
|
+
{ property: "og:url", content: `${websiteurl}${route.path}` },
|
|
42
|
+
{ property: "og:image", content: logo }
|
|
43
|
+
],
|
|
44
|
+
script: [
|
|
45
|
+
{
|
|
46
|
+
src: recaptcha,
|
|
47
|
+
async: true,
|
|
48
|
+
defer: true
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
children: `
|
|
52
|
+
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
53
|
+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
54
|
+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
55
|
+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
56
|
+
})(window,document,'script','dataLayer','${gtmId}');
|
|
57
|
+
`
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
children: `${tiktok}`
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
children: `${facebookMeta}`
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: "application/ld+json",
|
|
67
|
+
children: JSON.stringify({
|
|
68
|
+
"@context": "https://schema.org",
|
|
69
|
+
"@type": "WebSite",
|
|
70
|
+
"url": websiteurl,
|
|
71
|
+
"name": sitename,
|
|
72
|
+
"alternateName": meta_title,
|
|
73
|
+
"description": meta_description,
|
|
74
|
+
"inLanguage": "en",
|
|
75
|
+
"potentialAction": {
|
|
76
|
+
"@type": "SearchAction",
|
|
77
|
+
"target": `${websiteurl}/search?search={search_term_string}`,
|
|
78
|
+
"query-input": "required name=search_term_string"
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
return {};
|
|
85
|
+
};
|
|
@@ -23,7 +23,7 @@ export function useCards() {
|
|
|
23
23
|
store.setLoading(true);
|
|
24
24
|
store.setError(null);
|
|
25
25
|
try {
|
|
26
|
-
const response = await get("/customer/cards");
|
|
26
|
+
const response = await get("/mystore/customer/cards");
|
|
27
27
|
if (response.status === "Success" && response.data) {
|
|
28
28
|
store.setCards(response.data.data);
|
|
29
29
|
return response;
|
|
@@ -45,7 +45,7 @@ export function useCards() {
|
|
|
45
45
|
store.setLoading(true);
|
|
46
46
|
store.setError(null);
|
|
47
47
|
try {
|
|
48
|
-
const response = await del(`/customer/cards/${cardId}`);
|
|
48
|
+
const response = await del(`/mystore/customer/cards/${cardId}`);
|
|
49
49
|
if (response.status === "Success") {
|
|
50
50
|
store.removeCard(cardId);
|
|
51
51
|
return response;
|
|
@@ -9,7 +9,7 @@ const getDataLayer = () => {
|
|
|
9
9
|
};
|
|
10
10
|
const getCurrencyCode = () => {
|
|
11
11
|
const companyProfile = useCompanyProfile();
|
|
12
|
-
return companyProfile.profile?.currencyCode || "USD";
|
|
12
|
+
return companyProfile.profile?.data?.currencyCode || "USD";
|
|
13
13
|
};
|
|
14
14
|
export function GTM_page_view(to) {
|
|
15
15
|
const dataLayer = getDataLayer();
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { useCartStore } from "../stores/Cart.js";
|
|
2
|
+
import { useAuthStore } from "../stores/auth.js";
|
|
3
|
+
import { useRouter } from "vue-router";
|
|
4
|
+
const cartStore = useCartStore();
|
|
5
|
+
const authStore = useAuthStore();
|
|
6
|
+
const router = useRouter();
|
|
7
|
+
const getUTCDateTime = () => {
|
|
8
|
+
const now = /* @__PURE__ */ new Date();
|
|
9
|
+
const pad = (number) => number < 10 ? `0${number}` : number;
|
|
10
|
+
const year = now.getUTCFullYear();
|
|
11
|
+
const month = pad(now.getUTCMonth() + 1);
|
|
12
|
+
const day = pad(now.getUTCDate());
|
|
13
|
+
const hours = pad(now.getUTCHours());
|
|
14
|
+
const minutes = pad(now.getUTCMinutes());
|
|
15
|
+
const seconds = pad(now.getUTCSeconds());
|
|
16
|
+
return `${year}${month}${day}T${hours}${minutes}${seconds}Z`;
|
|
17
|
+
};
|
|
18
|
+
const generateProductUrl = (sku) => {
|
|
19
|
+
const resolvedRoute = router.resolve({ name: "Product", params: { slug: sku } });
|
|
20
|
+
return window.location.origin + resolvedRoute.href;
|
|
21
|
+
};
|
|
22
|
+
const generateCartUrl = (token) => {
|
|
23
|
+
const resolvedRoute = router.resolve({ name: "AbandonedCart", params: { slug: token } });
|
|
24
|
+
return "https://" + window.location.host + resolvedRoute.href;
|
|
25
|
+
};
|
|
26
|
+
export function addtodotdigital(email) {
|
|
27
|
+
if (typeof window.dmPt !== "undefined" && window.dmPt) {
|
|
28
|
+
window.dmPt("identify", email);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function sendCartInsight() {
|
|
32
|
+
if (typeof window.dmPt !== "undefined" && window.dmPt) {
|
|
33
|
+
const cartItems = cartStore.cart.items;
|
|
34
|
+
const totals = cartStore.cart.totals;
|
|
35
|
+
const abndToken = cartStore.cart.abndToken;
|
|
36
|
+
const isAuthenticated = authStore.isAuthenticated;
|
|
37
|
+
const cartPhase = isAuthenticated ? "CUSTOMER_LOGIN" : "Guest";
|
|
38
|
+
if (isAuthenticated) {
|
|
39
|
+
window.dmPt("identify", authStore.user.email);
|
|
40
|
+
}
|
|
41
|
+
let lineItems = [];
|
|
42
|
+
if (cartItems) {
|
|
43
|
+
Object.values(cartItems).forEach((item, index) => {
|
|
44
|
+
lineItems.push({
|
|
45
|
+
sku: item.sku,
|
|
46
|
+
name: item.name,
|
|
47
|
+
description: item.name,
|
|
48
|
+
category: item.category,
|
|
49
|
+
unitPrice: item.rpfloat,
|
|
50
|
+
salePrice: item.pricefloat,
|
|
51
|
+
quantity: item.qty,
|
|
52
|
+
totalPrice: Number(item.qty * item.pricefloat),
|
|
53
|
+
imageUrl: item.image,
|
|
54
|
+
productUrl: generateProductUrl(item.slug)
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const cartData = {
|
|
59
|
+
programID: 33188,
|
|
60
|
+
cartDelay: 1,
|
|
61
|
+
cartID: abndToken,
|
|
62
|
+
cartPhase: "CART",
|
|
63
|
+
currency: "AUD",
|
|
64
|
+
subtotal: totals.subtotal,
|
|
65
|
+
discountAmount: totals.discount,
|
|
66
|
+
createDate: getUTCDateTime(),
|
|
67
|
+
modifiedDate: getUTCDateTime(),
|
|
68
|
+
taxAmount: totals.gst,
|
|
69
|
+
shipping: totals.shipping,
|
|
70
|
+
grandTotal: totals.total,
|
|
71
|
+
cartUrl: generateCartUrl(abndToken),
|
|
72
|
+
lineItems
|
|
73
|
+
};
|
|
74
|
+
window.dmPt("cartInsight", cartData);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export function CompleteCartInsight(cart, status) {
|
|
78
|
+
if (typeof window.dmPt !== "undefined" && window.dmPt) {
|
|
79
|
+
const cartItems = cart.items;
|
|
80
|
+
const totals = cart.totals;
|
|
81
|
+
const abndToken = cart.abndToken;
|
|
82
|
+
const isAuthenticated = authStore.isAuthenticated;
|
|
83
|
+
const cartPhase = isAuthenticated ? "CUSTOMER_LOGIN" : "Guest";
|
|
84
|
+
if (isAuthenticated == true) {
|
|
85
|
+
dmPt("identify", authStore.user.email);
|
|
86
|
+
}
|
|
87
|
+
let lineItems = [];
|
|
88
|
+
if (cartItems) {
|
|
89
|
+
Object.values(cartItems).forEach((item, index) => {
|
|
90
|
+
lineItems.push({
|
|
91
|
+
sku: item.sku,
|
|
92
|
+
name: item.name,
|
|
93
|
+
description: item.name,
|
|
94
|
+
category: item.category,
|
|
95
|
+
unitPrice: item.rpfloat,
|
|
96
|
+
salePrice: item.pricefloat,
|
|
97
|
+
quantity: item.qty,
|
|
98
|
+
totalPrice: Number(item.qty * item.pricefloat),
|
|
99
|
+
imageUrl: item.image,
|
|
100
|
+
productUrl: generateProductUrl(item.slug)
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const cartData = {
|
|
105
|
+
programID: 33188,
|
|
106
|
+
cartDelay: 1,
|
|
107
|
+
cartID: abndToken,
|
|
108
|
+
cartPhase: status,
|
|
109
|
+
currency: "AUD",
|
|
110
|
+
subtotal: totals.subtotal,
|
|
111
|
+
discountAmount: totals.discount,
|
|
112
|
+
createDate: getUTCDateTime(),
|
|
113
|
+
modifiedDate: getUTCDateTime(),
|
|
114
|
+
taxAmount: totals.gst,
|
|
115
|
+
shipping: totals.shipping,
|
|
116
|
+
grandTotal: totals.total,
|
|
117
|
+
cartUrl: generateCartUrl(abndToken),
|
|
118
|
+
lineItems
|
|
119
|
+
};
|
|
120
|
+
window.dmPt("cartInsight", cartData);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -5,18 +5,8 @@ export interface LocationData {
|
|
|
5
5
|
city?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const useLocation: () => {
|
|
8
|
-
location: Readonly<import("vue").Ref<
|
|
9
|
-
|
|
10
|
-
readonly countryCode?: string | undefined;
|
|
11
|
-
readonly state?: string | undefined;
|
|
12
|
-
readonly city?: string | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
readonly country: string;
|
|
15
|
-
readonly countryCode?: string | undefined;
|
|
16
|
-
readonly state?: string | undefined;
|
|
17
|
-
readonly city?: string | undefined;
|
|
18
|
-
}>>;
|
|
19
|
-
shippingCountry: Readonly<import("vue").Ref<string, string>>;
|
|
8
|
+
location: Readonly<import("vue").Ref<any, any>>;
|
|
9
|
+
shippingCountry: Readonly<import("vue").Ref<any, any>>;
|
|
20
10
|
updateLocation: (newLocation: Partial<LocationData>) => void;
|
|
21
11
|
updateCountry: (country: string, countryCode?: string) => void;
|
|
22
12
|
resetLocation: () => void;
|
|
@@ -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
|
}
|
|
@@ -192,9 +192,9 @@ export function META_add_shipping_info(cart = null, shipping_tier = null) {
|
|
|
192
192
|
});
|
|
193
193
|
fbq("trackCustom", "add_shipping_info", {
|
|
194
194
|
contents: ecomarceCartItems,
|
|
195
|
-
content_type: shipping_tier?.
|
|
195
|
+
content_type: shipping_tier?.name || "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
|
}
|