flowrix 1.0.1-beta.147 → 1.0.1-beta.149
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/runtime/components/SampleProductCard.d.vue.ts +13 -0
- package/dist/runtime/components/SampleProductCard.vue +362 -0
- package/dist/runtime/components/SampleProductCard.vue.d.ts +13 -0
- package/dist/runtime/components/WishList/dropdown.d.vue.ts +9 -0
- package/dist/runtime/components/WishList/dropdown.vue +417 -0
- package/dist/runtime/components/WishList/dropdown.vue.d.ts +9 -0
- package/dist/runtime/components/WishList/modal.d.vue.ts +13 -0
- package/dist/runtime/components/WishList/modal.vue +229 -0
- package/dist/runtime/components/WishList/modal.vue.d.ts +13 -0
- package/dist/runtime/components/product/AddToCart.d.vue.ts +15 -0
- package/dist/runtime/components/product/AddToCart.vue +176 -0
- package/dist/runtime/components/product/AddToCart.vue.d.ts +15 -0
- package/dist/runtime/components/product/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/product/AddtoCartSample.vue +110 -0
- package/dist/runtime/components/product/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/product/Badges.d.vue.ts +13 -0
- package/dist/runtime/components/product/Badges.vue +84 -0
- package/dist/runtime/components/product/Badges.vue.d.ts +13 -0
- package/dist/runtime/components/product/Description.d.vue.ts +9 -0
- package/dist/runtime/components/product/Description.vue +96 -0
- package/dist/runtime/components/product/Description.vue.d.ts +9 -0
- package/dist/runtime/components/product/Dynamic.d.vue.ts +9 -0
- package/dist/runtime/components/product/Dynamic.vue +136 -0
- package/dist/runtime/components/product/Dynamic.vue.d.ts +9 -0
- package/dist/runtime/components/product/Gallery.d.vue.ts +11 -0
- package/dist/runtime/components/product/Gallery.vue +133 -0
- package/dist/runtime/components/product/Gallery.vue.d.ts +11 -0
- package/dist/runtime/components/product/PopUpCart.d.vue.ts +11 -0
- package/dist/runtime/components/product/PopUpCart.vue +155 -0
- package/dist/runtime/components/product/PopUpCart.vue.d.ts +11 -0
- package/dist/runtime/components/product/ProductInfo.d.vue.ts +7 -0
- package/dist/runtime/components/product/ProductInfo.vue +105 -0
- package/dist/runtime/components/product/ProductInfo.vue.d.ts +7 -0
- package/dist/runtime/components/product/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/product/RequiredPopUp.vue +57 -0
- package/dist/runtime/components/product/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.d.vue.ts +13 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.vue +35 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.vue.d.ts +13 -0
- package/dist/runtime/components/product/bundleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/bundleProduct/index.vue +32 -0
- package/dist/runtime/components/product/bundleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.vue +101 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/product/customProduct/Attributes.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/Attributes.vue +12 -0
- package/dist/runtime/components/product/customProduct/Attributes.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue +253 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue +253 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue +214 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue +133 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue +35 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue +134 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.d.vue.ts +15 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue +138 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue.d.ts +15 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue +149 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue +82 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue +108 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue +104 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue +87 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue +219 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue +36 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue +45 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue +48 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue +154 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue +111 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue +269 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue +63 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue +63 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue +220 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue +47 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue +91 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.vue +25 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.vue +49 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/Reviews.d.vue.ts +7 -0
- package/dist/runtime/components/product/customProduct/Reviews.vue +25 -0
- package/dist/runtime/components/product/customProduct/Reviews.vue.d.ts +7 -0
- package/dist/runtime/components/product/customProduct/SingleStep.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/SingleStep.vue +11 -0
- package/dist/runtime/components/product/customProduct/SingleStep.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/Steps.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/Steps.vue +221 -0
- package/dist/runtime/components/product/customProduct/Steps.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/index.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/index.vue +272 -0
- package/dist/runtime/components/product/customProduct/index.vue.d.ts +9 -0
- package/dist/runtime/components/product/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/index.vue +90 -0
- package/dist/runtime/components/product/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.d.vue.ts +11 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.vue.d.ts +11 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.d.vue.ts +7 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.vue +74 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.vue.d.ts +7 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.d.vue.ts +9 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue +63 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue.d.ts +9 -0
- package/dist/runtime/components/product/sampleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/sampleProduct/index.vue +64 -0
- package/dist/runtime/components/product/sampleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.d.vue.ts +11 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.vue.d.ts +11 -0
- package/dist/runtime/components/product/simpleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/simpleProduct/index.vue +34 -0
- package/dist/runtime/components/product/simpleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.d.ts +3 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.js +20 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.d.ts +70 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.js +63 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.js +107 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.d.ts +159 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.js +2079 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.d.ts +4 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.js +27 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.d.ts +68 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.js +21 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.d.ts +67 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.js +15 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.d.ts +88 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.js +72 -0
- package/dist/runtime/composables/index.d.ts +8 -0
- package/dist/runtime/composables/index.js +8 -0
- package/dist/runtime/pages/flowrix-default.vue +15 -6
- package/dist/runtime/plugins/bootstrap.client.d.ts +2 -0
- package/dist/runtime/plugins/bootstrap.client.js +9 -0
- package/dist/runtime/server/api/cart/related.js +15 -2
- package/package.json +1 -1
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, onBeforeMount, watch } from "vue";
|
|
3
|
+
import { useWindowSize } from "@vueuse/core";
|
|
4
|
+
const { product } = defineProps({ product: Object });
|
|
5
|
+
import RequiredPopUp from "./RequiredPopUp.vue";
|
|
6
|
+
import ProductAddToCart from "../AddToCart.vue";
|
|
7
|
+
import AddtoCartSample from "../AddtoCartSample.vue";
|
|
8
|
+
import ProductDescription from "../Description.vue";
|
|
9
|
+
import ProductReviews from "./Reviews.vue";
|
|
10
|
+
import wishlistDropdown from "../../WishList/dropdown.vue";
|
|
11
|
+
const {
|
|
12
|
+
useCustomeScriptDynamic,
|
|
13
|
+
activeStep,
|
|
14
|
+
NextStep,
|
|
15
|
+
sortedGroups,
|
|
16
|
+
scrollToPosition,
|
|
17
|
+
SingleStep,
|
|
18
|
+
AddToCart,
|
|
19
|
+
RequiredValidation
|
|
20
|
+
} = useStepsDynamic(product, product.template);
|
|
21
|
+
const windowWidth = ref(0);
|
|
22
|
+
const closeModal = () => {
|
|
23
|
+
open.value = false;
|
|
24
|
+
RequiredValidation.value = [];
|
|
25
|
+
};
|
|
26
|
+
const getScreenWidth = () => {
|
|
27
|
+
const headers = useRequestHeaders(["user-agent"]);
|
|
28
|
+
const userAgent = headers["user-agent"] || "";
|
|
29
|
+
const isMobile = /Mobile|Android|iP(hone|od|ad)/.test(userAgent);
|
|
30
|
+
return isMobile ? 375 : 1025;
|
|
31
|
+
};
|
|
32
|
+
const sampleData = computed(() => {
|
|
33
|
+
const samples = [];
|
|
34
|
+
for (const attributeId in product.attributeIdz) {
|
|
35
|
+
const attribute = product.attributeIdz[attributeId];
|
|
36
|
+
if (attribute.values) {
|
|
37
|
+
for (const valueId in attribute.values) {
|
|
38
|
+
const value = attribute.values[valueId];
|
|
39
|
+
if (value.sampleproduct) {
|
|
40
|
+
samples.push(value.sampleproduct);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return samples;
|
|
46
|
+
});
|
|
47
|
+
const partialGroup = (groups) => {
|
|
48
|
+
const myObject = groups;
|
|
49
|
+
var sortedObject = [];
|
|
50
|
+
if (myObject) {
|
|
51
|
+
const sortedArray = Object.entries(myObject).sort(
|
|
52
|
+
(a, b) => a[1]["sortorder"] - b[1]["sortorder"]
|
|
53
|
+
);
|
|
54
|
+
sortedArray.forEach(([key, value]) => {
|
|
55
|
+
sortedObject.push(value);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return sortedObject;
|
|
59
|
+
};
|
|
60
|
+
const showBtn = ref(true);
|
|
61
|
+
const visibleSteps = ref(1);
|
|
62
|
+
const showNextGroup = () => {
|
|
63
|
+
visibleSteps.value = product.groups.length;
|
|
64
|
+
showBtn.value = false;
|
|
65
|
+
};
|
|
66
|
+
const showSimpleGroup = () => {
|
|
67
|
+
visibleSteps.value = 1;
|
|
68
|
+
showBtn.value = true;
|
|
69
|
+
};
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<div class="row border-bottom mb-3">
|
|
74
|
+
<div class="col-xl-9">
|
|
75
|
+
<h1 class="text-primary fw-semibold fs-2 mt-3 mt-lg-0">{{ product.name }}</h1>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="col-xl-3 col-auto order-first order-xl-last" v-if="product.reviews && product.reviews.length > 0">
|
|
78
|
+
<div class="reviews-stars">
|
|
79
|
+
<ProductReviews v-if="product.reviews && product.reviews.length > 0" :reviews="product.reviews" />
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="product-wizard">
|
|
84
|
+
<template v-if="SingleStep && AddToCart">
|
|
85
|
+
<template v-for="(group, index) in partialGroup(product.groups)" :key="group.id">
|
|
86
|
+
<div class="single-step" :class="{ 'd-none': (index + 1) > visibleSteps }">
|
|
87
|
+
<component :is="SingleStep" :group="group" :product />
|
|
88
|
+
</div>
|
|
89
|
+
</template>
|
|
90
|
+
</template>
|
|
91
|
+
<div class="product-top-details d-flex justify-content-end align-items-end mt-4 pb-3 border-bottom">
|
|
92
|
+
<div class="align-self-center">
|
|
93
|
+
<div class="d-flex flex-column price">
|
|
94
|
+
<span class="pricecontent fw-bold text-primary fs-1">
|
|
95
|
+
$<span class="price_span">{{ useCustomeScriptDynamic().productPrice }}</span>
|
|
96
|
+
</span>
|
|
97
|
+
<span class="if-discounted text-danger text-decoration-line-through fs-6"
|
|
98
|
+
v-if="useCustomeScriptDynamic().productDiscountedPrice > 0">
|
|
99
|
+
$<span id="dis_price">{{ useCustomeScriptDynamic().productDiscountedPrice }}</span>
|
|
100
|
+
</span>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="steps-buttons d-flex justify-content-between pt-3 pb-4">
|
|
106
|
+
|
|
107
|
+
<div class="col" v-if="getScreenWidth() < 1024">
|
|
108
|
+
<div class="d-flex flex-column price lh-1">
|
|
109
|
+
<span class="fs-3">Price</span>
|
|
110
|
+
<span>
|
|
111
|
+
<span class="pricecontent fs-2 fw-bold text-secondary">
|
|
112
|
+
$<span class="price_span fs-2">{{ useCustomeScriptDynamic().productPrice }}</span>
|
|
113
|
+
</span>
|
|
114
|
+
<span class="if-discounted fs-2 text-danger text-decoration-line-through"
|
|
115
|
+
v-if="useCustomeScriptDynamic().productDiscountedPrice > 0">
|
|
116
|
+
$<span id="dis_price fs-2">{{
|
|
117
|
+
useCustomeScriptDynamic().productDiscountedPrice
|
|
118
|
+
}}</span>
|
|
119
|
+
</span>
|
|
120
|
+
</span>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div class="col mb-4">
|
|
126
|
+
<ProductAddToCart from="detailpage" :product="product" service="" />
|
|
127
|
+
</div>
|
|
128
|
+
<div class="col">
|
|
129
|
+
<button type="button" class="btn btn-outline-primary fw-semibold w-100 rounded-pill py-2" v-if="showBtn && Object.keys(product.groups).length>1" @click="showNextGroup">
|
|
130
|
+
Advanced Customisation
|
|
131
|
+
</button>
|
|
132
|
+
<button type="button" v-if="!showBtn && Object.keys(product.groups).length>1" @click="showSimpleGroup" class="btn btn-outline-primary fw-semibold w-100 rounded-pill py-2" >
|
|
133
|
+
Back to simple Customisation
|
|
134
|
+
</button>
|
|
135
|
+
</div>
|
|
136
|
+
<div v-if="sampleData.length>0" class="col mt-4">
|
|
137
|
+
<AddtoCartSample :samples="sampleData" />
|
|
138
|
+
</div>
|
|
139
|
+
<div class="d-flex justify-content-center align-content-center">
|
|
140
|
+
<wishlistDropdown :product="product" />
|
|
141
|
+
</div>
|
|
142
|
+
<ProductDescription :product />
|
|
143
|
+
<div v-if="RequiredValidation.length > 0">
|
|
144
|
+
<RequiredPopUp @closeRequried="closeModal" :fields="RequiredValidation" />
|
|
145
|
+
</div>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<style scoped>
|
|
149
|
+
.product-wizard {
|
|
150
|
+
scrollbar-width: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.step-content {
|
|
154
|
+
transition-duration: 0s;
|
|
155
|
+
opacity: 0;
|
|
156
|
+
max-height: 0;
|
|
157
|
+
position: relative;
|
|
158
|
+
z-index: -1;
|
|
159
|
+
}
|
|
160
|
+
.step-content.active {
|
|
161
|
+
position: unset;
|
|
162
|
+
transition-duration: 500ms;
|
|
163
|
+
opacity: 1;
|
|
164
|
+
max-height: fit-content;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.backbutton:hover {
|
|
168
|
+
color: #fff;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.icon {
|
|
172
|
+
font-size: 14px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.wizard-steps {
|
|
176
|
+
position: relative;
|
|
177
|
+
z-index: 2;
|
|
178
|
+
top: -25px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.error-popup-modal {
|
|
182
|
+
position: fixed;
|
|
183
|
+
top: 0;
|
|
184
|
+
left: 0;
|
|
185
|
+
width: 100vw;
|
|
186
|
+
height: 100vh;
|
|
187
|
+
background: rgba(0, 0, 0, 0.5);
|
|
188
|
+
z-index: 99;
|
|
189
|
+
display: grid;
|
|
190
|
+
place-items: center;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.error-body {
|
|
194
|
+
background: #fff;
|
|
195
|
+
width: 30%;
|
|
196
|
+
min-width: 300px;
|
|
197
|
+
padding: 20px;
|
|
198
|
+
text-align: center;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.reviews-stars {
|
|
202
|
+
display: flex;
|
|
203
|
+
justify-content: end;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@media screen and (max-width: 1024px) {
|
|
207
|
+
.step-content {
|
|
208
|
+
transition-duration: 0s;
|
|
209
|
+
opacity: 1;
|
|
210
|
+
max-height: unset;
|
|
211
|
+
position: unset;
|
|
212
|
+
z-index: -1;
|
|
213
|
+
}
|
|
214
|
+
.step-content.active {
|
|
215
|
+
position: unset;
|
|
216
|
+
transition-duration: 0ms;
|
|
217
|
+
opacity: 1;
|
|
218
|
+
max-height: unset;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof __VLS_props>;
|
|
5
|
+
product?: Record<string, any> | undefined;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_props: {
|
|
8
|
+
readonly product?: Record<string, any> | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
product: {
|
|
3
|
+
template: string;
|
|
4
|
+
};
|
|
5
|
+
productData: any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const { product, productData } = defineProps({
|
|
3
|
+
product: { type: Object, required: true },
|
|
4
|
+
productData: { type: null, required: true }
|
|
5
|
+
});
|
|
6
|
+
import attributes from "./Attributes.vue";
|
|
7
|
+
import { useCustomeScriptDynamic } from "../../../composables/Product/CustomProductDynamic/useCustomeScriptDynamic";
|
|
8
|
+
const gallery = defineAsyncComponent(() => import("../Gallery.vue"));
|
|
9
|
+
const CustomScript = useCustomeScriptDynamic();
|
|
10
|
+
onMounted(() => {
|
|
11
|
+
CustomScript.attributeIdz = product.attributeIdz;
|
|
12
|
+
CustomScript.lookupprices = product.lookupprices;
|
|
13
|
+
CustomScript.servicePriceSetting = product.servicePriceSetting;
|
|
14
|
+
CustomScript.conditions = product.conditions;
|
|
15
|
+
CustomScript.TYPES = product.types;
|
|
16
|
+
CustomScript.PRICETYPE = product.pricetypes;
|
|
17
|
+
CustomScript.UNIT_RELATIVE = product.unit_relative;
|
|
18
|
+
CustomScript.DISCOUNTS = product.discounts;
|
|
19
|
+
CustomScript.measurementUnit = product.unit;
|
|
20
|
+
CustomScript.promotionSettings = product.promotionSettings;
|
|
21
|
+
CustomScript.linked_promotionSettings = product.inherit_promotions;
|
|
22
|
+
CustomScript.B2BTYPE = product.b2btype;
|
|
23
|
+
CustomScript.USEBASEPRICE = product.usebaseprice;
|
|
24
|
+
CustomScript.BASEPRICE = product.baseprice;
|
|
25
|
+
CustomScript.usefitting = product.usefitting;
|
|
26
|
+
CustomScript.sevice_price_type = product.servicePriceSetting.sevice_price_type;
|
|
27
|
+
CustomScript.serviceprice = 0;
|
|
28
|
+
});
|
|
29
|
+
onUnmounted(() => {
|
|
30
|
+
CustomScript.renderdValues = 0;
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<!-- <pre>{{ CustomScript.productPrice }}</pre> -->
|
|
36
|
+
<form class="customproductform">
|
|
37
|
+
<!-- <pre>
|
|
38
|
+
{{ productData.html }}
|
|
39
|
+
</pre> -->
|
|
40
|
+
<attributes :product="product" :productData />
|
|
41
|
+
</form>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<style scoped>
|
|
45
|
+
:deep() .wizard-steps .single-step {
|
|
46
|
+
position: relative;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
}
|
|
49
|
+
:deep() .wizard-steps .single-step span {
|
|
50
|
+
width: 50px;
|
|
51
|
+
height: 50px;
|
|
52
|
+
background: #e5e5e5;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
color: #8e8e8e;
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
font-size: 22px;
|
|
59
|
+
z-index: 0;
|
|
60
|
+
border: 1px solid #ded9d9;
|
|
61
|
+
margin: 0 auto;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
:deep() .wizard-steps .single-step span:hover {
|
|
65
|
+
background: var(--iseek-primary);
|
|
66
|
+
border: 0;
|
|
67
|
+
color: #fff;
|
|
68
|
+
}
|
|
69
|
+
:deep() .wizard-steps .single-step span.active {
|
|
70
|
+
background: var(--iseek-primary);
|
|
71
|
+
border: 0;
|
|
72
|
+
color: #fff;
|
|
73
|
+
}
|
|
74
|
+
:deep() .wizard-steps .single-step line.active {
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 3px;
|
|
77
|
+
display: block;
|
|
78
|
+
background: var(--iseek-primary);
|
|
79
|
+
position: absolute;
|
|
80
|
+
right: calc(50% - 25px);
|
|
81
|
+
z-index: -1;
|
|
82
|
+
top: 50%;
|
|
83
|
+
}
|
|
84
|
+
:deep() .price {
|
|
85
|
+
font-size: 18px;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
font-family: "Poppins";
|
|
88
|
+
}
|
|
89
|
+
:deep() .price .pricecontent {
|
|
90
|
+
color: var(--iseek-primary);
|
|
91
|
+
font-size: 3rem;
|
|
92
|
+
line-height: 1;
|
|
93
|
+
}
|
|
94
|
+
:deep() .product-sub-title {
|
|
95
|
+
font-size: 3rem !important;
|
|
96
|
+
margin-bottom: 20px;
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
position: relative;
|
|
99
|
+
}
|
|
100
|
+
:deep() .product-sub-title span {
|
|
101
|
+
background: #fff;
|
|
102
|
+
z-index: 1;
|
|
103
|
+
position: relative;
|
|
104
|
+
padding-right: 10px;
|
|
105
|
+
}
|
|
106
|
+
:deep() .product-sub-title:after {
|
|
107
|
+
content: "";
|
|
108
|
+
position: absolute;
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 3px;
|
|
111
|
+
left: 0;
|
|
112
|
+
bottom: 0;
|
|
113
|
+
background: var(--iseek-secondary);
|
|
114
|
+
}
|
|
115
|
+
:deep() .product-card-item #card-item-image {
|
|
116
|
+
height: 300px;
|
|
117
|
+
position: relative;
|
|
118
|
+
background-size: cover;
|
|
119
|
+
background-position: center;
|
|
120
|
+
}
|
|
121
|
+
:deep() .product-card-item #card-item-image img {
|
|
122
|
+
position: absolute;
|
|
123
|
+
}
|
|
124
|
+
:deep() .product-card-item .card-item-detail .card-item-title {
|
|
125
|
+
font-size: 2rem !important;
|
|
126
|
+
font-weight: bold;
|
|
127
|
+
}
|
|
128
|
+
:deep() .col-form-label {
|
|
129
|
+
font-family: "Poppins", Georgia, "Times New Roman", Times, serif;
|
|
130
|
+
font-size: 15px;
|
|
131
|
+
}
|
|
132
|
+
:deep() .input-group-text {
|
|
133
|
+
font-size: 1em;
|
|
134
|
+
}
|
|
135
|
+
:deep() .multiselect__input,
|
|
136
|
+
:deep() .multiselect__single {
|
|
137
|
+
display: flex !important;
|
|
138
|
+
align-items: center !important;
|
|
139
|
+
}
|
|
140
|
+
:deep() span.option__desc {
|
|
141
|
+
display: block !important;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
}
|
|
144
|
+
:deep() span.option__title {
|
|
145
|
+
white-space: pre;
|
|
146
|
+
}
|
|
147
|
+
:deep() .image-box-magnifier-hover-image {
|
|
148
|
+
box-shadow: 0px 0px 5px 5px #e2e2e2;
|
|
149
|
+
border-radius: 10px;
|
|
150
|
+
width: 450px;
|
|
151
|
+
height: 450px;
|
|
152
|
+
z-index: 1;
|
|
153
|
+
}
|
|
154
|
+
:deep() .image-box-magnifier-hover-image-simple {
|
|
155
|
+
box-shadow: 0px 0px 5px 5px #e2e2e2;
|
|
156
|
+
border-radius: 10px;
|
|
157
|
+
width: 450px;
|
|
158
|
+
height: 300px;
|
|
159
|
+
z-index: 1;
|
|
160
|
+
width: auto !important;
|
|
161
|
+
position: absolute;
|
|
162
|
+
bottom: 100%;
|
|
163
|
+
background: #fff;
|
|
164
|
+
}
|
|
165
|
+
:deep() .lightbox {
|
|
166
|
+
display: flex;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
align-items: center;
|
|
169
|
+
position: fixed;
|
|
170
|
+
top: 0;
|
|
171
|
+
left: 0;
|
|
172
|
+
width: 100%;
|
|
173
|
+
height: 100%;
|
|
174
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
175
|
+
z-index: 99999;
|
|
176
|
+
animation: all ease-in-out 0.3s 0.3s;
|
|
177
|
+
}
|
|
178
|
+
:deep() .lightbox .lightbox-content {
|
|
179
|
+
position: relative;
|
|
180
|
+
background-color: #fff;
|
|
181
|
+
padding: 10px;
|
|
182
|
+
max-width: 100%;
|
|
183
|
+
max-height: 100%;
|
|
184
|
+
border-radius: 9px;
|
|
185
|
+
}
|
|
186
|
+
:deep() .lightbox .lightbox-content .close-button {
|
|
187
|
+
position: absolute;
|
|
188
|
+
top: 10px;
|
|
189
|
+
right: 10px;
|
|
190
|
+
font-size: 20px;
|
|
191
|
+
cursor: pointer;
|
|
192
|
+
}
|
|
193
|
+
:deep() .lightbox .lightbox-content .light-img {
|
|
194
|
+
height: 500px;
|
|
195
|
+
margin-bottom: 10px;
|
|
196
|
+
}
|
|
197
|
+
:deep() .lightbox .lightbox-content .nav {
|
|
198
|
+
position: absolute;
|
|
199
|
+
top: calc(50% - 5px);
|
|
200
|
+
}
|
|
201
|
+
:deep() .lightbox .lightbox-content .nav.btn-prev {
|
|
202
|
+
left: -30px;
|
|
203
|
+
right: auto;
|
|
204
|
+
}
|
|
205
|
+
:deep() .lightbox .lightbox-content .nav.btn-next {
|
|
206
|
+
right: -30px;
|
|
207
|
+
left: auto;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.product-summary-sticky {
|
|
211
|
+
position: fixed;
|
|
212
|
+
right: 0;
|
|
213
|
+
width: 5vw;
|
|
214
|
+
height: 100px;
|
|
215
|
+
background: var(--iseek-primary);
|
|
216
|
+
display: flex;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
align-items: center;
|
|
219
|
+
border-radius: 20px 0 0 20px;
|
|
220
|
+
top: calc(50% - 50px);
|
|
221
|
+
}
|
|
222
|
+
.product-summary-sticky #summray-opener {
|
|
223
|
+
text-align: center;
|
|
224
|
+
display: flex;
|
|
225
|
+
padding: 0 10px;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
align-items: center;
|
|
229
|
+
}
|
|
230
|
+
.product-summary-sticky #summray-opener h4 {
|
|
231
|
+
font-size: 11px;
|
|
232
|
+
margin-top: 5px;
|
|
233
|
+
/* white-space:nowrap; */
|
|
234
|
+
text-align: center;
|
|
235
|
+
color: #fff;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.sticky_summary_details {
|
|
239
|
+
position: fixed;
|
|
240
|
+
padding: 20px 30px;
|
|
241
|
+
width: 35vw;
|
|
242
|
+
border-radius: 10px;
|
|
243
|
+
top: calc(50vh - 150px);
|
|
244
|
+
right: 0;
|
|
245
|
+
background: #eeeeee;
|
|
246
|
+
font-size: 13px;
|
|
247
|
+
line-height: 1;
|
|
248
|
+
z-index: 99;
|
|
249
|
+
}
|
|
250
|
+
.sticky_summary_details.mobile {
|
|
251
|
+
display: block;
|
|
252
|
+
position: unset;
|
|
253
|
+
width: 90vw;
|
|
254
|
+
margin: auto;
|
|
255
|
+
}
|
|
256
|
+
.sticky_summary_details.mobile .summary-column:nth-child(2n) {
|
|
257
|
+
border-left: 0px solid rgba(112, 112, 112, 0.22);
|
|
258
|
+
}
|
|
259
|
+
.sticky_summary_details.mobile .close_summary {
|
|
260
|
+
cursor: pointer;
|
|
261
|
+
}
|
|
262
|
+
.sticky_summary_details.desktop .summary-column:nth-child(2n) {
|
|
263
|
+
border-left: 1px solid rgba(112, 112, 112, 0.22);
|
|
264
|
+
padding-left: 15px;
|
|
265
|
+
}
|
|
266
|
+
.sticky_summary_details.desktop .summary-column:nth-child(1n) {
|
|
267
|
+
padding-right: 15px;
|
|
268
|
+
}
|
|
269
|
+
.sticky_summary_details.desktop .close_summary {
|
|
270
|
+
cursor: pointer;
|
|
271
|
+
}
|
|
272
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
product: {
|
|
3
|
+
template: string;
|
|
4
|
+
};
|
|
5
|
+
productData: any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
product: {
|
|
3
|
+
template: string;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
definePageMeta({
|
|
3
|
+
middleware: "check-product"
|
|
4
|
+
});
|
|
5
|
+
const { product } = defineProps({
|
|
6
|
+
product: { type: Object, required: true }
|
|
7
|
+
});
|
|
8
|
+
const Dynamic = defineAsyncComponent(() => import("./Dynamic.vue"));
|
|
9
|
+
const route = useRoute();
|
|
10
|
+
const cartStore = useCartStore();
|
|
11
|
+
let slug = route.params.slug;
|
|
12
|
+
const query = route.query;
|
|
13
|
+
const productData = ref(null);
|
|
14
|
+
const customizeId = ref(query?.customize?.toString() || null);
|
|
15
|
+
const isCopyMode = ref(query?.copy === "true" || query?.copy === true);
|
|
16
|
+
const cartItemData = computed(() => {
|
|
17
|
+
if (!customizeId.value) return null;
|
|
18
|
+
const cartItems = cartStore.cart?.items || {};
|
|
19
|
+
return cartItems[customizeId.value] || null;
|
|
20
|
+
});
|
|
21
|
+
const payload = computed(() => {
|
|
22
|
+
if (!cartItemData.value) return {};
|
|
23
|
+
const cartOptions = cartItemData.value.options || {};
|
|
24
|
+
return {
|
|
25
|
+
attribute_id: cartOptions.ids || {},
|
|
26
|
+
fraction: cartOptions.fraction || {}
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
const payloadwithquery = {};
|
|
30
|
+
Object.entries(route.query).forEach(([key, value]) => {
|
|
31
|
+
const match = key.match(/attributeid_(\d+)/);
|
|
32
|
+
if (match && value) {
|
|
33
|
+
const newKey = `attribute_id[${match[1]}]`;
|
|
34
|
+
payloadwithquery[newKey] = parseInt(
|
|
35
|
+
Array.isArray(value) ? value[0] : value,
|
|
36
|
+
10
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
console.log("payloadwithquery payloadwithquery payloadwithquery", payloadwithquery);
|
|
41
|
+
const { data, error, pending } = await useFetch(`/api/product/${slug}`, {
|
|
42
|
+
method: "post",
|
|
43
|
+
query: payloadwithquery,
|
|
44
|
+
body: payload
|
|
45
|
+
});
|
|
46
|
+
if (error.value) {
|
|
47
|
+
console.error("Error fetching product:", error.value);
|
|
48
|
+
} else {
|
|
49
|
+
productData.value = data.value;
|
|
50
|
+
}
|
|
51
|
+
const { Template } = useProductComponent(data.value?.data, product.data.template);
|
|
52
|
+
import { useHead } from "#app";
|
|
53
|
+
const config = useRuntimeConfig();
|
|
54
|
+
const getFullUrl = () => {
|
|
55
|
+
if (process.client) {
|
|
56
|
+
return window.location.href;
|
|
57
|
+
}
|
|
58
|
+
return `${config.public.siteUrl || ""}${route.fullPath}`;
|
|
59
|
+
};
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<div v-if="product.data.is_dynamic">
|
|
64
|
+
<Dynamic :data="product" :product="data"/>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<style scoped>
|
|
69
|
+
.product-sub-title {
|
|
70
|
+
font-size: 3rem !important;
|
|
71
|
+
margin-bottom: 20px;
|
|
72
|
+
font-weight: bold;
|
|
73
|
+
position: relative;
|
|
74
|
+
}
|
|
75
|
+
.product-sub-title span {
|
|
76
|
+
background: #fff;
|
|
77
|
+
z-index: 1;
|
|
78
|
+
position: relative;
|
|
79
|
+
padding-right: 10px;
|
|
80
|
+
}
|
|
81
|
+
.product-sub-title:after {
|
|
82
|
+
content: "";
|
|
83
|
+
position: absolute;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 3px;
|
|
86
|
+
left: 0;
|
|
87
|
+
bottom: 0;
|
|
88
|
+
background: var(--bs-secondary);
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
product: {
|
|
3
|
+
template: string;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
attribute?: any;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
variationChange: (...args: any[]) => void;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
attribute?: any;
|
|
7
|
+
}> & Readonly<{
|
|
8
|
+
onVariationChange?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|