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,136 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import productAttribute from "./customProduct/Attributes.vue";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
4
|
+
import { useHead } from "#app";
|
|
5
|
+
import { useCustomeScriptDynamic } from "../../composables/Product/CustomProductDynamic/useCustomeScriptDynamic";
|
|
6
|
+
const route = useRoute();
|
|
7
|
+
const { data, product } = defineProps(["data", "product"]);
|
|
8
|
+
const variabledata = product.data;
|
|
9
|
+
const CustomScript = useCustomeScriptDynamic();
|
|
10
|
+
CustomScript.attributeIdz = variabledata.attributeIdz;
|
|
11
|
+
CustomScript.lookupprices = variabledata.lookupprices;
|
|
12
|
+
CustomScript.servicePriceSetting = variabledata.servicePriceSetting;
|
|
13
|
+
CustomScript.conditions = variabledata.conditions;
|
|
14
|
+
CustomScript.TYPES = variabledata.types;
|
|
15
|
+
CustomScript.PRICETYPE = variabledata.pricetypes;
|
|
16
|
+
CustomScript.UNIT_RELATIVE = variabledata.unit_relative;
|
|
17
|
+
CustomScript.DISCOUNTS = variabledata.discounts;
|
|
18
|
+
CustomScript.measurementUnit = variabledata.unit;
|
|
19
|
+
CustomScript.promotionSettings = variabledata.promotionSettings;
|
|
20
|
+
CustomScript.linked_promotionSettings = variabledata.inherit_promotions;
|
|
21
|
+
CustomScript.B2BTYPE = variabledata.b2btype;
|
|
22
|
+
CustomScript.USEBASEPRICE = variabledata.usebaseprice;
|
|
23
|
+
CustomScript.BASEPRICE = variabledata.baseprice;
|
|
24
|
+
CustomScript.usefitting = variabledata.usefitting;
|
|
25
|
+
CustomScript.sevice_price_type = variabledata.servicePriceSetting?.sevice_price_type;
|
|
26
|
+
CustomScript.serviceprice = 0;
|
|
27
|
+
onMounted(() => {
|
|
28
|
+
if (dynamicRef.value) {
|
|
29
|
+
const container = dynamicRef.value.querySelector(".product-attributes-wrapper");
|
|
30
|
+
if (container) {
|
|
31
|
+
container.innerHTML = "";
|
|
32
|
+
attributeTeleportTarget.value = container;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
onUnmounted(() => {
|
|
37
|
+
CustomScript.renderdValues = 0;
|
|
38
|
+
});
|
|
39
|
+
const applyDynamicSSR = (async (html, variables = {}) => {
|
|
40
|
+
if (!html || typeof html !== "string") return html ?? "";
|
|
41
|
+
return html.replace(
|
|
42
|
+
/<(p|h[1-5])([^>]*data-dynamic="true"[^>]*)>([\s\S]*?)<\/\1>/gi,
|
|
43
|
+
(match, tag, attrs) => {
|
|
44
|
+
const fieldMatch = attrs.match(/data-dynamic-field="([^"]+)"/);
|
|
45
|
+
if (!fieldMatch) return match;
|
|
46
|
+
const fieldName = fieldMatch[1];
|
|
47
|
+
const value = variables[fieldName];
|
|
48
|
+
if (value === void 0) return match;
|
|
49
|
+
return `<${tag}${attrs}>${value}</${tag}>`;
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
const injectProductSliderHTML = (html, datahtml) => {
|
|
54
|
+
if (!html || typeof html !== "string") return html ?? "";
|
|
55
|
+
let images = datahtml?.images;
|
|
56
|
+
if (!images || !Array.isArray(images) || images.length === 0) return html;
|
|
57
|
+
const total = images.length;
|
|
58
|
+
const mainSlidesHTML = images.map((item, index) => `
|
|
59
|
+
<div
|
|
60
|
+
data-gjs-type="product-slide"
|
|
61
|
+
class="swiper-slide"
|
|
62
|
+
role="group"
|
|
63
|
+
aria-label="${index + 1} / ${total}"
|
|
64
|
+
data-swiper-slide-index="${index}"
|
|
65
|
+
>
|
|
66
|
+
<img src="${item.image}" alt="Product Image ${index + 1}">
|
|
67
|
+
</div>
|
|
68
|
+
`).join("");
|
|
69
|
+
const thumbSlidesHTML = images.map((item, index) => `
|
|
70
|
+
<div
|
|
71
|
+
data-gjs-type="product-thumb-slide"
|
|
72
|
+
class="swiper-slide"
|
|
73
|
+
role="group"
|
|
74
|
+
aria-label="${index + 1} / ${total}"
|
|
75
|
+
>
|
|
76
|
+
<img src="${item.image}" alt="Product Image ${index + 1}">
|
|
77
|
+
</div>
|
|
78
|
+
`).join("");
|
|
79
|
+
html = html.replace(
|
|
80
|
+
/(<div[^>]*class="[^"]*swiper-wrapper[^"]*"[^>]*>)[\s\S]*?(<\/div>)/,
|
|
81
|
+
`$1${mainSlidesHTML}$2`
|
|
82
|
+
);
|
|
83
|
+
html = html.replace(
|
|
84
|
+
/(<div[^>]*class="[^"]*thumb-slider-container[\s\S]*?<div[^>]*class="[^"]*swiper-wrapper[^"]*"[^>]*>)[\s\S]*?(<\/div>)/,
|
|
85
|
+
`$1${thumbSlidesHTML}$2`
|
|
86
|
+
);
|
|
87
|
+
return html;
|
|
88
|
+
};
|
|
89
|
+
const htmlFromCMS = data?.data?.content?.html ?? "";
|
|
90
|
+
const finalHTML = await applyDynamicSSR(htmlFromCMS, variabledata);
|
|
91
|
+
const finalHTMLSlider = await injectProductSliderHTML(finalHTML, variabledata);
|
|
92
|
+
const hasAttributeContainer = /class="[^"]*product-attributes-wrapper[^"]*"/.test(finalHTML);
|
|
93
|
+
const dynamicRef = ref(null);
|
|
94
|
+
const attributeTeleportTarget = ref(null);
|
|
95
|
+
function scopeCss(css, scope = ".dynamicContent") {
|
|
96
|
+
if (!css || typeof css !== "string") return "";
|
|
97
|
+
return css.replace(
|
|
98
|
+
/(^|})\s*([^@}{]+)\s*\{/g,
|
|
99
|
+
(match, brace, selector) => {
|
|
100
|
+
const scopedSelector = selector.split(",").map((sel) => {
|
|
101
|
+
sel = sel.trim();
|
|
102
|
+
if (sel.startsWith(scope)) return sel;
|
|
103
|
+
sel = sel.replace(/^body\b/, "").replace(/^html\b/, "").replace(/^\*/, "").trim();
|
|
104
|
+
return sel ? `${scope} ${sel}` : scope;
|
|
105
|
+
}).join(", ");
|
|
106
|
+
return `${brace} ${scopedSelector} {`;
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
useHead(() => {
|
|
111
|
+
const Globalcss = data?.data?.content?.globalstyles?.globalCSS || "";
|
|
112
|
+
const css = data?.data?.content?.css || "";
|
|
113
|
+
if (!css) return {};
|
|
114
|
+
return {
|
|
115
|
+
style: [
|
|
116
|
+
{
|
|
117
|
+
children: scopeCss(css),
|
|
118
|
+
id: "scoped-css",
|
|
119
|
+
type: "text/css"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
children: Globalcss,
|
|
123
|
+
id: "global-css",
|
|
124
|
+
type: "text/css"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<template>
|
|
132
|
+
<div class="dynamicContent" ref="dynamicRef" v-html="finalHTML"></div>
|
|
133
|
+
<Teleport :to="attributeTeleportTarget" v-if="attributeTeleportTarget">
|
|
134
|
+
<productAttribute :product="variabledata" />
|
|
135
|
+
</Teleport>
|
|
136
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
product?: any;
|
|
3
|
+
data?: any;
|
|
4
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
5
|
+
product?: any;
|
|
6
|
+
data?: any;
|
|
7
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "swiper/css";
|
|
2
|
+
import "swiper/css/free-mode";
|
|
3
|
+
import "swiper/css/navigation";
|
|
4
|
+
import "swiper/css/thumbs";
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
6
|
+
productData?: any;
|
|
7
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
8
|
+
productData?: any;
|
|
9
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Swiper, SwiperSlide } from "swiper/vue";
|
|
3
|
+
import "swiper/css";
|
|
4
|
+
import "swiper/css/free-mode";
|
|
5
|
+
import "swiper/css/navigation";
|
|
6
|
+
import "swiper/css/thumbs";
|
|
7
|
+
import Badges from "./Badges.vue";
|
|
8
|
+
import { FreeMode, Navigation, Thumbs, Mousewheel } from "swiper/modules";
|
|
9
|
+
const modules = [FreeMode, Navigation, Thumbs, Mousewheel];
|
|
10
|
+
defineProps(["productData"]);
|
|
11
|
+
const isMobile = ref(false);
|
|
12
|
+
if (typeof window !== "undefined") {
|
|
13
|
+
const checkMobile = () => {
|
|
14
|
+
isMobile.value = window.innerWidth <= 1200;
|
|
15
|
+
};
|
|
16
|
+
checkMobile();
|
|
17
|
+
window.addEventListener("resize", checkMobile);
|
|
18
|
+
}
|
|
19
|
+
const thumbsSwiper = ref(null);
|
|
20
|
+
const setThumbsSwiper = (swiper) => {
|
|
21
|
+
thumbsSwiper.value = swiper;
|
|
22
|
+
};
|
|
23
|
+
function goToSlide(index) {
|
|
24
|
+
if (!thumbsSwiper.value) return;
|
|
25
|
+
thumbsSwiper.value.slideTo(index);
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<div class="row">
|
|
31
|
+
<div class="col-xl-3 col-12" v-if="productData.images && productData.images.length > 0">
|
|
32
|
+
<Swiper :direction="isMobile ? 'horizontal' : 'vertical'"
|
|
33
|
+
@swiper="setThumbsSwiper"
|
|
34
|
+
:spaceBetween="isMobile ? 15 : 40"
|
|
35
|
+
:centeredSlides="true"
|
|
36
|
+
:centeredSlidesBounds="true"
|
|
37
|
+
:slidesPerView="3"
|
|
38
|
+
:modules="[]"
|
|
39
|
+
:class="isMobile ? 'mySwiper mt-3' : 'mySwiper'"
|
|
40
|
+
>
|
|
41
|
+
<SwiperSlide v-for="(item, index) in productData.images" :key="'thumb-' + index">
|
|
42
|
+
<div class="product-slider-img" @click="goToSlide(index)">
|
|
43
|
+
<img :src="item.image" class="img-fluid rounded-4 cursor-pointer" />
|
|
44
|
+
</div>
|
|
45
|
+
</SwiperSlide>
|
|
46
|
+
</Swiper>
|
|
47
|
+
</div>
|
|
48
|
+
<div :class="
|
|
49
|
+
productData.images && productData.images.length > 0 ? 'col-xl-9 col-12 order-first order-xl-last position-relative' : 'col-12 position-relative'
|
|
50
|
+
">
|
|
51
|
+
<Badges :productData />
|
|
52
|
+
<Swiper v-if="productData.images && productData.images.length > 0" :style="{
|
|
53
|
+
'--swiper-navigation-color': '#000',
|
|
54
|
+
'--swiper-pagination-color': '#000'
|
|
55
|
+
}" :spaceBetween="10" :loop="true" :thumbs="{ swiper: thumbsSwiper }" :modules="modules" class="mySwiper2">
|
|
56
|
+
<SwiperSlide v-for="(item, index) in productData.images" :key="index">
|
|
57
|
+
<img :src="item.image" class="img-fluid rounded-4 w-100" />
|
|
58
|
+
|
|
59
|
+
<div class="discount-offer position-absolute top-0 z-1 ms-5" v-if="item.percentOff">
|
|
60
|
+
<img :src="item.percentOff" alt="15 Percent Off" class="img-fluid" />
|
|
61
|
+
</div>
|
|
62
|
+
<div v-if="item.badge"
|
|
63
|
+
class="text-white rounded-5 text-center px-4 mt-2 me-5 p-1 position-absolute top-0 end-0 z-1 bg-green">
|
|
64
|
+
{{ item.badge }}
|
|
65
|
+
</div>
|
|
66
|
+
</SwiperSlide>
|
|
67
|
+
</Swiper>
|
|
68
|
+
<div v-else-if="productData.image" class="mySwiper2">
|
|
69
|
+
<Badges :productData />
|
|
70
|
+
<img :src="productData.image" class="img-fluid rounded-4 w-100" />
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<style scoped>
|
|
77
|
+
.cursor-pointer {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.mySwiper {
|
|
82
|
+
height: 410px;
|
|
83
|
+
scroll-behavior: smooth;
|
|
84
|
+
}
|
|
85
|
+
.mySwiper img {
|
|
86
|
+
height: 120px;
|
|
87
|
+
object-fit: cover;
|
|
88
|
+
padding-left: 3px;
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.swiper-slide-thumb-active img {
|
|
93
|
+
padding-left: 3px;
|
|
94
|
+
}
|
|
95
|
+
.swiper-slide-thumb-active .product-slider-img {
|
|
96
|
+
border-left: 3px solid var(--bs-secondary);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bg-green {
|
|
100
|
+
background-color: var(--bs-green);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media only screen and (max-width: 768px) {
|
|
104
|
+
.mySwiper img {
|
|
105
|
+
height: 100%;
|
|
106
|
+
}
|
|
107
|
+
.mySwiper .swiper-slide-thumb-active img {
|
|
108
|
+
border-bottom: 2px solid var(--bs-secondary);
|
|
109
|
+
padding-bottom: 3px;
|
|
110
|
+
border-left: 0 !important;
|
|
111
|
+
border-radius: 0 !important;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
@media only screen and (max-width: 1200px) {
|
|
115
|
+
.mySwiper {
|
|
116
|
+
height: auto;
|
|
117
|
+
width: 100%;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
@media only screen and (min-width: 1201px) and (max-width: 1400px) {
|
|
121
|
+
.mySwiper {
|
|
122
|
+
height: 375px;
|
|
123
|
+
}
|
|
124
|
+
.mySwiper img {
|
|
125
|
+
height: 100px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
@media only screen and (min-width: 1401px) {
|
|
129
|
+
.mySwiper {
|
|
130
|
+
height: 440px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "swiper/css";
|
|
2
|
+
import "swiper/css/free-mode";
|
|
3
|
+
import "swiper/css/navigation";
|
|
4
|
+
import "swiper/css/thumbs";
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
6
|
+
productData?: any;
|
|
7
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
8
|
+
productData?: any;
|
|
9
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
price?: any;
|
|
6
|
+
productData?: any;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly price?: any;
|
|
10
|
+
readonly productData?: any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const { productData, price } = defineProps(["productData", "price"]);
|
|
3
|
+
const companyProfile = useCompanyProfile().profile.data;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div>
|
|
8
|
+
<div class="modals modal">
|
|
9
|
+
<div class="modal-dialog modal-dialog-centered opacity-100">
|
|
10
|
+
<div class="modal-content rounded-0">
|
|
11
|
+
<div class="modal-body pb-0 position-relative px-4">
|
|
12
|
+
<div class="card mb-lg-3 border-0 bg-transparent position-relative">
|
|
13
|
+
<button type="button" class="btn-close d-none d-md-block" @click="$emit('some-event')"></button>
|
|
14
|
+
<div class="row gy-0 align-items-center">
|
|
15
|
+
<div class="col-12 col-md-3 col-xl-2 d-flex align-items-center">
|
|
16
|
+
<img :src="productData.image" height="300px" class="img-fluid image w-100"
|
|
17
|
+
:alt="productData.name">
|
|
18
|
+
</div>
|
|
19
|
+
<div class="col-12 col-sm-8 col-md-9 col-xl-10 d-flex align-items-center">
|
|
20
|
+
<div class="card-body w-100">
|
|
21
|
+
<p class="fw-normal mb-0 fs-6">Added to your shopping cart</p>
|
|
22
|
+
<p class="fw-bold mb-2" v-if="Number(price)>0">{{ productData.name }} - <span class="text-primary">{{ companyProfile.currencySymbol }} {{
|
|
23
|
+
price }}</span></p>
|
|
24
|
+
<p class="fw-bold mb-2 fs-4 mt-2" v-else>{{ productData.name }} - <span class="text-primary"> {{ companyProfile.currencySymbol }}{{
|
|
25
|
+
useCustomeScriptDynamic().productPrice || productData?.price }}</span></p>
|
|
26
|
+
<p class="text-secondary fw-bold mb-0 fs-6 mt-2">You can continue shopping or move to your
|
|
27
|
+
shopping cart
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="modal-footer d-flex flex-row flex-wrap flex-md-nowrap mt-0 px-4">
|
|
35
|
+
<button type="button" class="btn rounded-pill btn-secondary w-100 fw-semibold text-white" @click="$emit('someEvent')"> Continue Shopping</button>
|
|
36
|
+
<NuxtLink :to="{ path:'/checkout/cart'}" class="btn rounded-pill btn-outline-secondary w-100 text-dark shadow-none fw-semibold border">View your shopping
|
|
37
|
+
cart <i class="bi bi-chevron-right"></i> </NuxtLink>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<style scoped>
|
|
46
|
+
.modal {
|
|
47
|
+
z-index: 9999909999;
|
|
48
|
+
background-color: rgba(51, 51, 51, 0.55);
|
|
49
|
+
width: 100vw;
|
|
50
|
+
height: 100vh;
|
|
51
|
+
display: flex;
|
|
52
|
+
}
|
|
53
|
+
.modal .modal-dialog {
|
|
54
|
+
max-width: 700px;
|
|
55
|
+
width: 75%;
|
|
56
|
+
}
|
|
57
|
+
.modal .modal-dialog .image {
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 88px;
|
|
60
|
+
object-fit: cover;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.btn-close {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0.5rem;
|
|
66
|
+
right: 0.5rem;
|
|
67
|
+
z-index: 10;
|
|
68
|
+
opacity: 0.6;
|
|
69
|
+
transition: opacity 0.2s ease;
|
|
70
|
+
}
|
|
71
|
+
.btn-close:hover {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@media only screen and (max-width: 768px) {
|
|
76
|
+
.modal-dialog {
|
|
77
|
+
width: 92% !important;
|
|
78
|
+
max-width: 400px !important;
|
|
79
|
+
margin: auto !important;
|
|
80
|
+
padding: 1rem !important;
|
|
81
|
+
}
|
|
82
|
+
.modal-content {
|
|
83
|
+
border-radius: 16px !important;
|
|
84
|
+
animation: fadeInScale 0.25s ease-out !important;
|
|
85
|
+
border: 1px solid rgba(0, 0, 0, 0.1) !important;
|
|
86
|
+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
|
|
87
|
+
}
|
|
88
|
+
.modal-body {
|
|
89
|
+
padding: 1rem 1.25rem 0.5rem !important;
|
|
90
|
+
}
|
|
91
|
+
/* Alternative position: Inside modal but top-right */
|
|
92
|
+
/* .btn-close {
|
|
93
|
+
position: absolute !important;
|
|
94
|
+
top: 0.75rem !important;
|
|
95
|
+
right: 0.75rem !important;
|
|
96
|
+
width: 36px !important;
|
|
97
|
+
height: 36px !important;
|
|
98
|
+
padding: 0.5rem !important;
|
|
99
|
+
opacity: 0.8 !important;
|
|
100
|
+
background-size: 1rem !important;
|
|
101
|
+
background-color: rgba(255, 255, 255, 0.95) !important;
|
|
102
|
+
border-radius: 50% !important;
|
|
103
|
+
backdrop-filter: blur(4px) !important;
|
|
104
|
+
z-index: 1000 !important;
|
|
105
|
+
} */
|
|
106
|
+
.modal-footer {
|
|
107
|
+
flex-direction: column !important;
|
|
108
|
+
gap: 0.625rem !important;
|
|
109
|
+
padding: 0.75rem 1.25rem 1.25rem !important;
|
|
110
|
+
border-top: 1px solid #f1f3f5 !important;
|
|
111
|
+
}
|
|
112
|
+
.card-body {
|
|
113
|
+
padding-right: 2rem !important;
|
|
114
|
+
}
|
|
115
|
+
.card-body p.fs-5 {
|
|
116
|
+
font-size: 0.8375rem !important;
|
|
117
|
+
margin-bottom: 0.5rem !important;
|
|
118
|
+
}
|
|
119
|
+
.card-body p.fs-4 {
|
|
120
|
+
font-size: 1.4625rem !important;
|
|
121
|
+
margin-bottom: 0.375rem !important;
|
|
122
|
+
}
|
|
123
|
+
.card-body p.fs-6 {
|
|
124
|
+
font-size: 0.8125rem !important;
|
|
125
|
+
line-height: 1.4 !important;
|
|
126
|
+
font-weight: 500 !important;
|
|
127
|
+
}
|
|
128
|
+
.card-body .fw-bold.mb-2 {
|
|
129
|
+
font-size: 0.875rem !important;
|
|
130
|
+
line-height: 1.3 !important;
|
|
131
|
+
max-height: 2.6em !important;
|
|
132
|
+
overflow: hidden !important;
|
|
133
|
+
text-overflow: ellipsis !important;
|
|
134
|
+
display: block !important;
|
|
135
|
+
}
|
|
136
|
+
.image {
|
|
137
|
+
height: 195px !important;
|
|
138
|
+
border-radius: 6px !important;
|
|
139
|
+
object-fit: cover !important;
|
|
140
|
+
}
|
|
141
|
+
.row.g-0 {
|
|
142
|
+
gap: 0.75rem !important;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
@keyframes fadeInScale {
|
|
146
|
+
from {
|
|
147
|
+
opacity: 0;
|
|
148
|
+
transform: scale(0.95);
|
|
149
|
+
}
|
|
150
|
+
to {
|
|
151
|
+
opacity: 1;
|
|
152
|
+
transform: scale(1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
price?: any;
|
|
6
|
+
productData?: any;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly price?: any;
|
|
10
|
+
readonly productData?: any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
product?: any;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
product?: any;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ProductAddToCart from "./AddToCart.vue";
|
|
3
|
+
const { product } = defineProps(["product"]);
|
|
4
|
+
function scrollToTop() {
|
|
5
|
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
6
|
+
}
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div v-if="product.type == 'custom'"
|
|
11
|
+
class="fixed-product-info align-items-center justify-content-between py-2 px-5 d-none d-xl-flex">
|
|
12
|
+
<div class="d-flex align-items-center">
|
|
13
|
+
<img :src="product?.image" alt="Product Image" class="product-image me-3 rounded-4" />
|
|
14
|
+
<h2 class="mb-0 fs-4 me-4 fw-semibold">{{ product?.name }}</h2>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="d-flex align-items-center gap-3">
|
|
17
|
+
<div class="price lh-1 d-flex justify-content-start gap-3 align-items-center">
|
|
18
|
+
<span class="pricecontent fs-2 fw-bold text-primary">
|
|
19
|
+
$<span class="price_span">{{ useCustomeScriptDynamic().productPrice }}</span>
|
|
20
|
+
</span>
|
|
21
|
+
<span class="if-discounted text-danger text-decoration-line-through"
|
|
22
|
+
v-if="useCustomeScriptDynamic().productDiscountedPrice > 0">
|
|
23
|
+
$<span id="dis_price">{{ useCustomeScriptDynamic().productDiscountedPrice }}</span>
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
<ProductAddToCart from="detailpage" :product="product" service="" />
|
|
27
|
+
<button class="btn" @click="scrollToTop" title="Go to top">
|
|
28
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
|
|
29
|
+
class="bi bi-arrow-up" viewBox="0 0 16 16">
|
|
30
|
+
<path fill-rule="evenodd"
|
|
31
|
+
d="M8 12a.5.5 0 0 0 .5-.5V4.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 4.707V11.5A.5.5 0 0 0 8 12z" />
|
|
32
|
+
</svg> -->
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div v-if="product.type == 'simple'"
|
|
37
|
+
class="fixed-product-info align-items-center justify-content-between py-2 px-5 d-none d-xl-flex">
|
|
38
|
+
<div class="d-flex align-items-center">
|
|
39
|
+
<img :src="product?.image" alt="Product Image" class="product-image me-3" />
|
|
40
|
+
<h2 class="mb-0 me-4 fs-4">{{ product?.name }}</h2>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="d-flex align-items-center gap-3">
|
|
43
|
+
<div class="price lh-1 d-flex justify-content-start gap-3 align-items-center">
|
|
44
|
+
<span class="if-discounted text-danger text-decoration-line-through"
|
|
45
|
+
v-if="product.rpfloat > product.pricefloat">
|
|
46
|
+
<span id="dis_price">{{ product.rp }}</span>
|
|
47
|
+
</span>
|
|
48
|
+
<span class="pricecontent fs-1 fw-bold text-primary">
|
|
49
|
+
<span class="price_span">{{ product.price }}</span>
|
|
50
|
+
</span>
|
|
51
|
+
</div>
|
|
52
|
+
<ProductAddToCart from="detailpage" :product="product" service="" />
|
|
53
|
+
<button class="btn" @click="scrollToTop" title="Go to top">
|
|
54
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
|
|
55
|
+
class="bi bi-arrow-up" viewBox="0 0 16 16">
|
|
56
|
+
<path fill-rule="evenodd"
|
|
57
|
+
d="M8 12a.5.5 0 0 0 .5-.5V4.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 4.707V11.5A.5.5 0 0 0 8 12z" />
|
|
58
|
+
</svg>
|
|
59
|
+
</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div v-if="product?.type === 'bundle'"
|
|
63
|
+
class="fixed-product-info align-items-center justify-content-between py-2 px-5 d-none d-xl-flex">
|
|
64
|
+
<div class="d-flex align-items-center">
|
|
65
|
+
<img :src="product?.image" alt="Product Image" class="product-image me-3" />
|
|
66
|
+
<h2 class="mb-0 me-4 fs-4">{{ product?.name }}</h2>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="d-flex align-items-center gap-3">
|
|
69
|
+
<div class="price lh-1 d-flex justify-content-start gap-3 align-items-center">
|
|
70
|
+
<span class="if-discounted text-danger text-decoration-line-through"
|
|
71
|
+
v-if="product.rpfloat > product.pricefloat">
|
|
72
|
+
<span id="dis_price">{{ product.rp }}</span>
|
|
73
|
+
</span>
|
|
74
|
+
<span class="pricecontent fs-1 fw-bold text-primary">
|
|
75
|
+
<span class="price_span">{{ product.price }}</span>
|
|
76
|
+
</span>
|
|
77
|
+
</div>
|
|
78
|
+
<ProductAddToCart from="detailpage" :product="product" service="" />
|
|
79
|
+
<button class="btn" @click="scrollToTop" title="Go to top">
|
|
80
|
+
<div class="d-flex flex-column align-items-center p-0 m-0" style="gap:0; line-height:0;">
|
|
81
|
+
<i class="p-0 m-0" style="display:block; line-height:0; height:20px; overflow:hidden;">
|
|
82
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="34" viewBox="0 0 24 24">
|
|
83
|
+
<path fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round"
|
|
84
|
+
stroke-width="2" d="m17 14l-5-5m0 0l-5 5" />
|
|
85
|
+
</svg>
|
|
86
|
+
</i>
|
|
87
|
+
<i class="p-0 m-0" style="display:block; line-height:0; height:24px; overflow:hidden;">
|
|
88
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
89
|
+
style="display:block; vertical-align:middle;">
|
|
90
|
+
<g fill="none" stroke="#000" stroke-linejoin="round" stroke-width="1.5">
|
|
91
|
+
<path d="M6 9a6 6 0 0 1 12 0v6a6 6 0 0 1-12 0z" />
|
|
92
|
+
<path stroke-linecap="round" d="M12 7v4" />
|
|
93
|
+
</g>
|
|
94
|
+
</svg>
|
|
95
|
+
</i>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
</button>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<style scoped>
|
|
104
|
+
.fixed-product-info{background:#fff;border-top:1px solid #eee;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.05);left:0;position:fixed;width:100%;z-index:2}.product-image{border-radius:8px;height:50px;-o-object-fit:contain;object-fit:contain;width:64px}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
product?: any;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
product?: any;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -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
|
+
fields?: any;
|
|
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 fields?: any;
|
|
9
|
+
};
|