Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/bus 795 three collums product boxes #35

Merged
merged 10 commits into from
Sep 27, 2024
Binary file modified bun.lockb
Binary file not shown.
21 changes: 21 additions & 0 deletions components/cms/block/CmsBlockProductThreeColumn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script setup lang="ts">
import type { Schemas } from '@shopware/api-client/api-types';

const props = defineProps<{
block: Schemas['CmsBlock'];
}>();

const { getSlotContent } = useCmsBlock(props.block);

const leftContent: Schemas['CmsSlot'] = getSlotContent('left');
const centerContent: Schemas['CmsSlot'] = getSlotContent('center');
const rightContent: Schemas['CmsSlot'] = getSlotContent('right');
</script>

<template>
<div class="grid gap-4 md:grid-cols-3">
<CmsLoader :content="leftContent" />
<CmsLoader :content="centerContent" />
<CmsLoader :content="rightContent" />
</div>
</template>
14 changes: 14 additions & 0 deletions components/cms/element/CmsElementProductBox.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup lang="ts">
import type { CmsElementProductBox } from '@shopware-pwa/composables-next';
import ProductCard from '~/components/product/ProductCard.vue';
carojansing marked this conversation as resolved.
Show resolved Hide resolved

const props = defineProps<{
element: CmsElementProductBox;
}>();

const { product } = useProduct(props.element.data.product);
</script>

<template>
<ProductCard :product="product"></ProductCard>
carojansing marked this conversation as resolved.
Show resolved Hide resolved
</template>