@shopware/cms-base-layer 2.1.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -135
- package/app/app.config.ts +1 -0
- package/app/components/SwCategoryNavigation.vue +1 -0
- package/app/components/SwCategoryNavigationLink.vue +16 -8
- package/app/components/SwContactForm.vue +1 -0
- package/app/components/SwFilterChips.vue +1 -0
- package/app/components/SwListingProductPrice.vue +16 -4
- package/app/components/SwMedia3D.vue +13 -9
- package/app/components/SwNewsletterForm.vue +4 -3
- package/app/components/SwProductAddToCart.vue +24 -7
- package/app/components/SwProductCard.vue +5 -0
- package/app/components/SwProductCardDetails.vue +27 -9
- package/app/components/SwProductCardImage.vue +52 -35
- package/app/components/SwProductCardSkeleton.vue +37 -14
- package/app/components/SwProductGallery.vue +1 -0
- package/app/components/SwProductListingFilter.vue +5 -1
- package/app/components/SwProductListingFilters.vue +23 -8
- package/app/components/SwProductListingFiltersHorizontal.vue +6 -3
- package/app/components/SwProductPrice.vue +1 -0
- package/app/components/SwProductReviews.vue +14 -6
- package/app/components/SwProductReviewsForm.vue +15 -3
- package/app/components/SwProductUnits.vue +1 -0
- package/app/components/SwQuantitySelect.vue +10 -3
- package/app/components/SwSharedPrice.vue +1 -0
- package/app/components/SwSlider.vue +1 -0
- package/app/components/SwStockInfo.vue +12 -6
- package/app/components/SwVariantConfigurator.vue +5 -3
- package/app/components/listing-filters/SwFilterPrice.vue +79 -30
- package/app/components/listing-filters/SwFilterProperties.vue +40 -25
- package/app/components/listing-filters/SwFilterRating.vue +21 -9
- package/app/components/listing-filters/SwFilterShippingFree.vue +16 -8
- package/app/components/public/cms/CmsBlockSpatialViewer.vue +1 -0
- package/app/components/public/cms/CmsGenericBlock.vue +11 -4
- package/app/components/public/cms/CmsGenericElement.vue +8 -2
- package/app/components/public/cms/CmsNoComponent.vue +88 -8
- package/app/components/public/cms/CmsPage.md +1 -1
- package/app/components/public/cms/CmsPage.vue +5 -6
- package/app/components/public/cms/FrontendAccountCustomerGroupRegistrationPage.vue +52 -0
- package/app/components/public/cms/block/CmsBlockCategoryNavigation.vue +1 -0
- package/app/components/public/cms/block/CmsBlockCenterText.vue +1 -0
- package/app/components/public/cms/block/CmsBlockCrossSelling.vue +1 -0
- package/app/components/public/cms/block/CmsBlockCustomForm.vue +1 -0
- package/app/components/public/cms/block/CmsBlockForm.vue +1 -0
- package/app/components/public/cms/block/CmsBlockGalleryBuybox.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImage.vue +1 -0
- package/app/components/public/cms/block/CmsBlockImageBubbleRow.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageCover.vue +1 -0
- package/app/components/public/cms/block/CmsBlockImageFourColumn.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageGallery.vue +1 -0
- package/app/components/public/cms/block/CmsBlockImageGalleryBig.vue +1 -0
- package/app/components/public/cms/block/CmsBlockImageHighlightRow.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageSimpleGrid.vue +1 -0
- package/app/components/public/cms/block/CmsBlockImageSlider.vue +1 -0
- package/app/components/public/cms/block/CmsBlockImageText.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageTextBubble.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageTextCover.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageTextGallery.vue +4 -12
- package/app/components/public/cms/block/CmsBlockImageTextRow.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageThreeColumn.vue +1 -0
- package/app/components/public/cms/block/CmsBlockImageThreeCover.vue +4 -1
- package/app/components/public/cms/block/CmsBlockImageTwoColumn.vue +4 -1
- package/app/components/public/cms/block/CmsBlockProductDescriptionReviews.vue +1 -0
- package/app/components/public/cms/block/CmsBlockProductHeading.vue +1 -0
- package/app/components/public/cms/block/CmsBlockProductListing.vue +1 -0
- package/app/components/public/cms/block/CmsBlockProductThreeColumn.vue +1 -0
- package/app/components/public/cms/block/CmsBlockSidebarFilter.vue +1 -0
- package/app/components/public/cms/block/CmsBlockText.vue +1 -0
- package/app/components/public/cms/block/CmsBlockTextHero.vue +1 -0
- package/app/components/public/cms/block/CmsBlockTextOnImage.vue +2 -4
- package/app/components/public/cms/block/CmsBlockTextThreeColumn.vue +1 -0
- package/app/components/public/cms/block/CmsBlockTextTwoColumn.vue +4 -1
- package/app/components/public/cms/block/CmsBlockVimeoVideo.vue +1 -0
- package/app/components/public/cms/block/CmsBlockYoutubeVideo.vue +1 -0
- package/app/components/public/cms/element/CmsElementBuyBox.vue +90 -72
- package/app/components/public/cms/element/CmsElementCategoryNavigation.vue +14 -3
- package/app/components/public/cms/element/CmsElementCrossSelling.vue +3 -1
- package/app/components/public/cms/element/CmsElementCustomForm.vue +1 -0
- package/app/components/public/cms/element/CmsElementForm.vue +1 -0
- package/app/components/public/cms/element/CmsElementHtml.vue +0 -1
- package/app/components/public/cms/element/CmsElementImage.vue +15 -34
- package/app/components/public/cms/element/CmsElementImageGallery.vue +6 -2
- package/app/components/public/cms/element/CmsElementManufacturerLogo.vue +1 -0
- package/app/components/public/cms/element/CmsElementProductBox.vue +1 -0
- package/app/components/public/cms/element/CmsElementProductDescriptionReviews.vue +77 -29
- package/app/components/public/cms/element/CmsElementProductListing.vue +22 -7
- package/app/components/public/cms/element/CmsElementProductSlider.vue +6 -4
- package/app/components/public/cms/element/CmsElementText.vue +2 -0
- package/app/components/public/cms/element/CmsElementVimeoVideo.vue +1 -0
- package/app/components/public/cms/element/CmsElementYoutubeVideo.vue +1 -0
- package/app/components/public/cms/element/SwProductListingPagination.vue +8 -2
- package/app/components/public/cms/section/CmsSectionSidebar.vue +13 -8
- package/app/components/public/cms/skeleton/ProductCardSkeleton.vue +16 -5
- package/app/components/ui/SwitchButton.vue +53 -14
- package/app/components/ui/WishlistIcon.vue +8 -2
- package/app/composables/useImagePlaceholder.ts +2 -2
- package/app/composables/useLcpImagePreload.test.ts +1 -0
- package/app/composables/useLcpImagePreload.ts +12 -6
- package/app/composables/useTypedAppConfig.ts +16 -0
- package/app/helpers/cms/getImageSizes.test.ts +1 -0
- package/app/helpers/html-to-vue/ast.ts +1 -0
- package/app/helpers/html-to-vue/getOptionsFromNode.test.ts +1 -0
- package/app/helpers/html-to-vue/renderToHtml.ts +1 -0
- package/app/helpers/html-to-vue/renderer.ts +1 -0
- package/app/providers/shopware.test.ts +1 -0
- package/index.d.ts +37 -29
- package/nuxt.config.ts +5 -0
- package/package.json +22 -25
- package/app/plugins/unocss-runtime.client.ts +0 -23
- package/uno.config.ts +0 -94
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockGalleryBuybox } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -12,7 +13,9 @@ const leftContent = getSlotContent("left");
|
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
15
|
<template>
|
|
15
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
class="w-full flex flex-col lg:flex-row justify-center items-stretch gap-4 lg:gap-10 lg:px-0 overflow-hidden"
|
|
18
|
+
>
|
|
16
19
|
<!-- Gallery Section -->
|
|
17
20
|
<div class="w-full lg:w-3/5">
|
|
18
21
|
<CmsGenericElement :content="leftContent" />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageBubbleRow } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -13,7 +14,9 @@ const rightContent = getSlotContent("right");
|
|
|
13
14
|
const centerContent = getSlotContent("center");
|
|
14
15
|
</script>
|
|
15
16
|
<template>
|
|
16
|
-
<div
|
|
17
|
+
<div
|
|
18
|
+
class="cms-block-image-bubble-row flex flex-col sm:flex-row justify-start items-start gap-6 w-full"
|
|
19
|
+
>
|
|
17
20
|
<div class="w-full sm:flex-1 flex items-center justify-center">
|
|
18
21
|
<CmsGenericElement :content="leftContent" class="w-full" />
|
|
19
22
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageFourColumn } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -14,7 +15,9 @@ const centerLeftContent = getSlotContent("center-left");
|
|
|
14
15
|
const centerRightContent = getSlotContent("center-right");
|
|
15
16
|
</script>
|
|
16
17
|
<template>
|
|
17
|
-
<div
|
|
18
|
+
<div
|
|
19
|
+
class="cms-block-image-four-column flex flex-col sm:flex-row sm:flex-wrap lg:flex-nowrap justify-start items-start gap-6 w-full"
|
|
20
|
+
>
|
|
18
21
|
<div class="w-full sm:w-[calc(50%-12px)] lg:flex-1">
|
|
19
22
|
<CmsGenericElement :content="leftContent" />
|
|
20
23
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageHighlightRow } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -13,7 +14,9 @@ const rightContent = getSlotContent("right");
|
|
|
13
14
|
const centerContent = getSlotContent("center");
|
|
14
15
|
</script>
|
|
15
16
|
<template>
|
|
16
|
-
<div
|
|
17
|
+
<div
|
|
18
|
+
class="cms-block-image-highlight-row flex flex-col sm:flex-row justify-start items-start gap-6 w-full"
|
|
19
|
+
>
|
|
17
20
|
<div class="w-full sm:flex-1">
|
|
18
21
|
<CmsGenericElement :content="leftContent" />
|
|
19
22
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageText } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -12,7 +13,9 @@ const leftContent = getSlotContent("left");
|
|
|
12
13
|
const rightContent = getSlotContent("right");
|
|
13
14
|
</script>
|
|
14
15
|
<template>
|
|
15
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
class="flex flex-col md:flex-row justify-start items-stretch gap-6 w-full"
|
|
18
|
+
>
|
|
16
19
|
<div class="w-full md:flex-1 min-w-0 p-4 flex flex-col">
|
|
17
20
|
<CmsGenericElement :content="leftContent" class="flex-1" />
|
|
18
21
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageTextBubble } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -16,7 +17,9 @@ const rightText = getSlotContent("right-text");
|
|
|
16
17
|
const rightImage = getSlotContent("right-image");
|
|
17
18
|
</script>
|
|
18
19
|
<template>
|
|
19
|
-
<div
|
|
20
|
+
<div
|
|
21
|
+
class="cms-block-image-text-bubble flex flex-col sm:flex-row justify-start items-start gap-6 w-full"
|
|
22
|
+
>
|
|
20
23
|
<div class="w-full sm:flex-1">
|
|
21
24
|
<div class="self-stretch flex justify-center">
|
|
22
25
|
<CmsGenericElement
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageTextCover } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -12,7 +13,9 @@ const leftContent = getSlotContent("left");
|
|
|
12
13
|
const rightContent = getSlotContent("right");
|
|
13
14
|
</script>
|
|
14
15
|
<template>
|
|
15
|
-
<article
|
|
16
|
+
<article
|
|
17
|
+
class="flex flex-col md:flex-row justify-start items-start gap-6 w-full pb-6"
|
|
18
|
+
>
|
|
16
19
|
<div class="w-full md:flex-1 px-6 pt-6 md:px-0 md:pt-6 md:pl-6">
|
|
17
20
|
<CmsGenericElement :content="leftContent" />
|
|
18
21
|
</div>
|
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
CmsElementImage,
|
|
5
5
|
CmsElementText,
|
|
6
6
|
} from "@shopware/composables";
|
|
7
|
+
|
|
7
8
|
import { useCmsBlock } from "#imports";
|
|
8
9
|
|
|
9
10
|
const props = defineProps<{
|
|
@@ -55,10 +56,7 @@ function onImageClick(
|
|
|
55
56
|
:style="{ cursor: leftImageContent.data?.url && 'pointer' }"
|
|
56
57
|
@click="onImageClick(leftImageContent)"
|
|
57
58
|
/>
|
|
58
|
-
<CmsElementText
|
|
59
|
-
:content="leftTextContent"
|
|
60
|
-
class="self-stretch"
|
|
61
|
-
/>
|
|
59
|
+
<CmsElementText :content="leftTextContent" class="self-stretch" />
|
|
62
60
|
</div>
|
|
63
61
|
<div class="w-full sm:flex-1">
|
|
64
62
|
<CmsElementImage
|
|
@@ -68,10 +66,7 @@ function onImageClick(
|
|
|
68
66
|
}"
|
|
69
67
|
@click="onImageClick(centerImageContent)"
|
|
70
68
|
/>
|
|
71
|
-
<CmsElementText
|
|
72
|
-
:content="centerTextContent"
|
|
73
|
-
class="self-stretch"
|
|
74
|
-
/>
|
|
69
|
+
<CmsElementText :content="centerTextContent" class="self-stretch" />
|
|
75
70
|
</div>
|
|
76
71
|
<div class="w-full sm:flex-1">
|
|
77
72
|
<CmsElementImage
|
|
@@ -79,10 +74,7 @@ function onImageClick(
|
|
|
79
74
|
:style="{ cursor: rightImageContent.data?.url && 'pointer' }"
|
|
80
75
|
@click="onImageClick(rightImageContent)"
|
|
81
76
|
/>
|
|
82
|
-
<CmsElementText
|
|
83
|
-
:content="rightTextContent"
|
|
84
|
-
class="self-stretch"
|
|
85
|
-
/>
|
|
77
|
+
<CmsElementText :content="rightTextContent" class="self-stretch" />
|
|
86
78
|
</div>
|
|
87
79
|
</article>
|
|
88
80
|
</template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageTextRow } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -16,7 +17,9 @@ const rightImageContent = getSlotContent("right-image");
|
|
|
16
17
|
const rightTextContent = getSlotContent("right-text");
|
|
17
18
|
</script>
|
|
18
19
|
<template>
|
|
19
|
-
<div
|
|
20
|
+
<div
|
|
21
|
+
class="cms-block-image-text-row flex flex-col md:flex-row justify-center items-stretch gap-6 w-full"
|
|
22
|
+
>
|
|
20
23
|
<div class="w-full md:flex-1 flex flex-col">
|
|
21
24
|
<div class="flex-1 mb-4 overflow-hidden rounded-lg min-h-64">
|
|
22
25
|
<CmsGenericElement :content="leftImageContent" />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageThreeCover } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -13,7 +14,9 @@ const rightContent = getSlotContent("right");
|
|
|
13
14
|
const centerContent = getSlotContent("center");
|
|
14
15
|
</script>
|
|
15
16
|
<template>
|
|
16
|
-
<div
|
|
17
|
+
<div
|
|
18
|
+
class="cms-block-image-three-cover flex flex-col sm:flex-row justify-start items-start gap-6 w-full"
|
|
19
|
+
>
|
|
17
20
|
<div class="w-full sm:flex-1">
|
|
18
21
|
<CmsGenericElement :content="leftContent" />
|
|
19
22
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockImageTwoColumn } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -12,7 +13,9 @@ const leftContent = getSlotContent("left");
|
|
|
12
13
|
const rightContent = getSlotContent("right");
|
|
13
14
|
</script>
|
|
14
15
|
<template>
|
|
15
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
class="cms-block-image-two-column flex flex-col md:flex-row justify-start items-start gap-6 w-full"
|
|
18
|
+
>
|
|
16
19
|
<div class="w-full md:flex-1 md:min-w-0">
|
|
17
20
|
<CmsGenericElement :content="leftContent" />
|
|
18
21
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockTextOnImage } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -15,9 +16,6 @@ const slotContent = getSlotContent("content");
|
|
|
15
16
|
<div
|
|
16
17
|
class="cms-block-text-on-image min-h-[500px] py-20 bg-cover bg-bottom bg-no-repeat relative"
|
|
17
18
|
>
|
|
18
|
-
<CmsGenericElement
|
|
19
|
-
v-if="slotContent"
|
|
20
|
-
:content="slotContent"
|
|
21
|
-
/>
|
|
19
|
+
<CmsGenericElement v-if="slotContent" :content="slotContent" />
|
|
22
20
|
</div>
|
|
23
21
|
</template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CmsBlockTextTwoColumn } from "@shopware/composables";
|
|
3
|
+
|
|
3
4
|
import { useCmsBlock } from "#imports";
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -13,7 +14,9 @@ const rightContent = getSlotContent("right");
|
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<template>
|
|
16
|
-
<article
|
|
17
|
+
<article
|
|
18
|
+
class="cms-block-text-two-column grid md:grid-cols-2 gap-5 md:gap-20"
|
|
19
|
+
>
|
|
17
20
|
<CmsGenericElement
|
|
18
21
|
:content="leftContent"
|
|
19
22
|
class="cms-block-text-two-column__text"
|
|
@@ -3,6 +3,7 @@ import type { CmsElementBuyBox } from "@shopware/composables";
|
|
|
3
3
|
import { useCmsTranslations } from "@shopware/composables";
|
|
4
4
|
import { defu } from "defu";
|
|
5
5
|
import { computed } from "vue";
|
|
6
|
+
|
|
6
7
|
import {
|
|
7
8
|
useCmsElementConfig,
|
|
8
9
|
usePrice,
|
|
@@ -67,79 +68,96 @@ const unitName = computed(() => product.value?.unit?.name);
|
|
|
67
68
|
const productName = computed(() => product.value?.translated?.name || "");
|
|
68
69
|
</script>
|
|
69
70
|
<template>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:class="{
|
|
88
|
-
'text-red': hasListPrice,
|
|
89
|
-
}" :value="unitPrice" />
|
|
90
|
-
<div v-if="regulationPrice" class="text-xs flex text-secondary-500">
|
|
91
|
-
{{ translations.product.previously }}
|
|
92
|
-
<SwSharedPrice class="ml-1" :value="regulationPrice" />
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
<div v-else>
|
|
96
|
-
<table class="border-collapse table-auto w-full text-sm mb-8">
|
|
97
|
-
<thead>
|
|
98
|
-
<tr>
|
|
99
|
-
<th
|
|
100
|
-
class="border-b dark:border-secondary-600 font-medium p-4 pl-8 pt-0 pb-3 text-secondary-600 dark:text-secondary-200 text-left">
|
|
101
|
-
{{ translations.product.amount }}
|
|
102
|
-
</th>
|
|
71
|
+
<div
|
|
72
|
+
v-if="product"
|
|
73
|
+
:class="{
|
|
74
|
+
'h-full w-full flex flex-col': true,
|
|
75
|
+
'justify-start': alignment === 'flex-start',
|
|
76
|
+
'justify-end': alignment === 'flex-end',
|
|
77
|
+
'justify-center': alignment === 'center',
|
|
78
|
+
}"
|
|
79
|
+
>
|
|
80
|
+
<div
|
|
81
|
+
class="self-stretch inline-flex flex-col justify-start items-start gap-8 mt-4 min-w-0"
|
|
82
|
+
>
|
|
83
|
+
<div
|
|
84
|
+
class="md:hidden self-stretch text-surface-on-surface text-4xl font-normal font-serif leading-[60px]"
|
|
85
|
+
>
|
|
86
|
+
{{ productName }}
|
|
87
|
+
</div>
|
|
103
88
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
{{ getFormattedPrice(tierPrice.unitPrice) }}
|
|
122
|
-
</td>
|
|
123
|
-
</tr>
|
|
124
|
-
</tbody>
|
|
125
|
-
</table>
|
|
126
|
-
</div>
|
|
127
|
-
<div v-if="purchaseUnit && unitName" class="mt-1">
|
|
128
|
-
<span class="font-light"> {{ translations.product.content }}: </span>
|
|
129
|
-
<span class="font-light"> {{ purchaseUnit }} {{ unitName }} </span>
|
|
130
|
-
<span v-if="referencePrice" class="font-light">
|
|
131
|
-
{{ currency?.symbol }} {{ referencePrice?.price }} / /
|
|
132
|
-
{{ referencePrice?.referenceUnit }} {{ referencePrice?.unitName }}
|
|
133
|
-
</span>
|
|
134
|
-
</div>
|
|
135
|
-
<span class="text-brand-primary">
|
|
136
|
-
<template v-if="taxState === 'gross'">
|
|
137
|
-
{{ translations.product.pricesIncl }}
|
|
138
|
-
</template>
|
|
139
|
-
<template v-else> {{ translations.product.pricesExcl }} </template>
|
|
140
|
-
</span>
|
|
141
|
-
<SwVariantConfigurator @change="changeVariant" />
|
|
142
|
-
<SwProductAddToCart :product="product" />
|
|
89
|
+
<div v-if="tierPrices.length <= 1">
|
|
90
|
+
<SwSharedPrice
|
|
91
|
+
v-if="hasListPrice"
|
|
92
|
+
class="text-1xl text-secondary-900 basis-2/6 justify-start line-through"
|
|
93
|
+
:value="price?.listPrice?.price"
|
|
94
|
+
/>
|
|
95
|
+
<SwSharedPrice
|
|
96
|
+
v-if="unitPrice"
|
|
97
|
+
class="text-surface-on-surface text-base font-bold leading-normal"
|
|
98
|
+
:class="{
|
|
99
|
+
'text-red': hasListPrice,
|
|
100
|
+
}"
|
|
101
|
+
:value="unitPrice"
|
|
102
|
+
/>
|
|
103
|
+
<div v-if="regulationPrice" class="text-xs flex text-secondary-500">
|
|
104
|
+
{{ translations.product.previously }}
|
|
105
|
+
<SwSharedPrice class="ml-1" :value="regulationPrice" />
|
|
143
106
|
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<div v-else>
|
|
109
|
+
<table class="border-collapse table-auto w-full text-sm mb-8">
|
|
110
|
+
<thead>
|
|
111
|
+
<tr>
|
|
112
|
+
<th
|
|
113
|
+
class="border-b dark:border-secondary-600 font-medium p-4 pl-8 pt-0 pb-3 text-secondary-600 dark:text-secondary-200 text-left"
|
|
114
|
+
>
|
|
115
|
+
{{ translations.product.amount }}
|
|
116
|
+
</th>
|
|
117
|
+
|
|
118
|
+
<th
|
|
119
|
+
class="border-b dark:border-secondary-600 font-medium p-4 pr-8 pt-0 pb-3 text-secondary-600 dark:text-secondary-200 text-left"
|
|
120
|
+
>
|
|
121
|
+
{{ translations.product.price.label }}
|
|
122
|
+
</th>
|
|
123
|
+
</tr>
|
|
124
|
+
</thead>
|
|
125
|
+
<tbody class="bg-white dark:bg-secondary-800">
|
|
126
|
+
<tr v-for="(tierPrice, index) in tierPrices" :key="tierPrice.label">
|
|
127
|
+
<td
|
|
128
|
+
class="border-b border-secondary-100 dark:border-secondary-700 p-4 pl-8 font-medium text-secondary-500 dark:text-secondary-400"
|
|
129
|
+
>
|
|
130
|
+
<span v-if="index < tierPrices.length - 1">{{
|
|
131
|
+
translations.product.to
|
|
132
|
+
}}</span
|
|
133
|
+
><span v-else>{{ translations.product.from }}</span>
|
|
134
|
+
{{ tierPrice.quantity }}
|
|
135
|
+
</td>
|
|
136
|
+
<td
|
|
137
|
+
class="border-b border-secondary-100 dark:border-secondary-700 p-4 pr-8 font-medium text-current-500 dark:text-secondary-400"
|
|
138
|
+
>
|
|
139
|
+
{{ getFormattedPrice(tierPrice.unitPrice) }}
|
|
140
|
+
</td>
|
|
141
|
+
</tr>
|
|
142
|
+
</tbody>
|
|
143
|
+
</table>
|
|
144
|
+
</div>
|
|
145
|
+
<div v-if="purchaseUnit && unitName" class="mt-1">
|
|
146
|
+
<span class="font-light"> {{ translations.product.content }}: </span>
|
|
147
|
+
<span class="font-light"> {{ purchaseUnit }} {{ unitName }} </span>
|
|
148
|
+
<span v-if="referencePrice" class="font-light">
|
|
149
|
+
{{ currency?.symbol }} {{ referencePrice?.price }} / /
|
|
150
|
+
{{ referencePrice?.referenceUnit }} {{ referencePrice?.unitName }}
|
|
151
|
+
</span>
|
|
152
|
+
</div>
|
|
153
|
+
<span class="text-brand-primary">
|
|
154
|
+
<template v-if="taxState === 'gross'">
|
|
155
|
+
{{ translations.product.pricesIncl }}
|
|
156
|
+
</template>
|
|
157
|
+
<template v-else> {{ translations.product.pricesExcl }} </template>
|
|
158
|
+
</span>
|
|
159
|
+
<SwVariantConfigurator @change="changeVariant" />
|
|
160
|
+
<SwProductAddToCart :product="product" />
|
|
144
161
|
</div>
|
|
162
|
+
</div>
|
|
145
163
|
</template>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Ref } from "vue";
|
|
3
3
|
import { onMounted, ref } from "vue";
|
|
4
|
+
|
|
4
5
|
import { useCategory, useNavigation } from "#imports";
|
|
5
6
|
import type { Schemas } from "#shopware";
|
|
6
7
|
|
|
@@ -39,15 +40,25 @@ onMounted(async () => {
|
|
|
39
40
|
</script>
|
|
40
41
|
<template>
|
|
41
42
|
<ClientOnly>
|
|
42
|
-
<div
|
|
43
|
+
<div
|
|
44
|
+
v-if="!loading && categoryNavigation && categoryNavigation.length"
|
|
45
|
+
class="self-stretch inline-flex flex-col justify-start items-start gap-3"
|
|
46
|
+
>
|
|
43
47
|
<SwCategoryNavigation
|
|
44
48
|
:level="0"
|
|
45
49
|
:elements="categoryNavigation"
|
|
46
50
|
:active-category="activeCategory"
|
|
47
51
|
/>
|
|
48
52
|
</div>
|
|
49
|
-
<div
|
|
50
|
-
|
|
53
|
+
<div
|
|
54
|
+
v-else-if="loading"
|
|
55
|
+
class="self-stretch flex flex-col justify-start items-start gap-4 animate-pulse"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
v-for="i in 3"
|
|
59
|
+
:key="i"
|
|
60
|
+
class="w-full h-12 bg-surface-surface-container rounded"
|
|
61
|
+
></div>
|
|
51
62
|
</div>
|
|
52
63
|
</ClientOnly>
|
|
53
64
|
</template>
|