@mframework/layer-commerce 0.0.5 → 0.0.8
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/app/components/catalog/product/ProductAccordion/ProductAccordion.vue +41 -0
- package/app/components/catalog/product/ProductAccordion/__tests__/ProductAccordion.spec.ts +15 -0
- package/app/components/catalog/product/ProductAccordion/types.ts +5 -0
- package/app/components/catalog/product/ProductProperties/ProductProperties.vue +52 -0
- package/app/components/catalog/product/ProductProperties/__tests__/ProductProperties.spec.ts +15 -0
- package/app/components/catalog/product/ProductProperties/types.ts +5 -0
- package/app/components/catalog/product/ProductSlider/ProductSlider.vue +28 -0
- package/app/components/catalog/product/ProductSlider/__tests__/ProductSlider.spec.ts +14 -0
- package/app/components/catalog/product/ProductSlider/types.ts +7 -0
- package/app/components/catalog/product/RecommendedProducts/RecommendedProducts.vue +12 -0
- package/app/components/catalog/product/RecommendedProducts/types.ts +5 -0
- package/app/components/catalog/product/RenderContentProductSlider/RenderContentProductSlider.vue +11 -0
- package/app/components/catalog/product/add-attribute.vue +54 -0
- package/app/components/catalog/product/add-product-type.vue +54 -0
- package/app/components/catalog/product/add-product.vue +53 -0
- package/app/components/catalog/product/add-showcase.vue +52 -0
- package/app/components/catalog/product/add-station.vue +54 -0
- package/app/components/catalog/product/bestsellers.vue +69 -0
- package/app/components/catalog/product/bidding.vue +93 -0
- package/app/components/catalog/product/colorOptions.vue +58 -0
- package/app/components/catalog/product/deals.vue +61 -0
- package/app/components/catalog/product/exclusives.vue +58 -0
- package/app/components/catalog/product/featuredproducts.vue +69 -0
- package/app/components/catalog/product/giftCard.vue +63 -0
- package/app/components/catalog/product/latestproducts.vue +58 -0
- package/app/components/catalog/product/productCard.vue +71 -0
- package/app/components/catalog/product/productCompare.vue +60 -0
- package/app/components/catalog/product/productCompareTable.vue +441 -0
- package/app/components/catalog/product/productDetails.vue +120 -0
- package/app/components/catalog/product/productFaqs.vue +17 -0
- package/app/components/catalog/product/productGallery.vue +16 -0
- package/app/components/catalog/product/productQty.vue +54 -0
- package/app/components/catalog/product/productReviews.vue +56 -0
- package/app/components/catalog/product/productSpecs.vue +116 -0
- package/app/components/catalog/product/radiostation.vue +36 -0
- package/app/components/catalog/product/recentlyviewed.vue +43 -0
- package/app/components/catalog/product/relatedbrands.vue +54 -0
- package/app/components/catalog/product/relatedproducts.vue +58 -0
- package/app/components/catalog/product/relatedstations.vue +40 -0
- package/app/components/catalog/product/shippingOptions.vue +41 -0
- package/app/components/catalog/product/sizeOptions.vue +47 -0
- package/app/components/catalog/product/update-attribute-set.vue +209 -0
- package/app/components/catalog/product/update-attribute.vue +118 -0
- package/app/components/catalog/product/update-product.vue +372 -0
- package/app/components/catalog/product/update-showcase.vue +153 -0
- package/app/components/catalog/shops/relatedstores.vue +52 -0
- package/app/components/catalog/shops/restaurant.vue +66 -0
- package/app/components/catalog/shops/stores.vue +44 -0
- package/app/components/catalog/vendor/README.md +3 -0
- package/app/components/catalog/vendor/blocks/biggestcustomers.vue +33 -0
- package/app/components/catalog/vendor/blocks/lowestselling.vue +33 -0
- package/app/components/catalog/vendor/blocks/topcategories.vue +33 -0
- package/app/components/catalog/vendor/blocks/topproducts.vue +27 -0
- package/app/components/catalog/vendor/pages/attributes.vue +43 -0
- package/app/components/catalog/vendor/pages/commissions.vue +43 -0
- package/app/components/catalog/vendor/pages/crm.vue +67 -0
- package/app/components/catalog/vendor/pages/dashboard.vue +46 -0
- package/app/components/catalog/vendor/pages/emails.vue +43 -0
- package/app/components/catalog/vendor/pages/enquiries.vue +43 -0
- package/app/components/catalog/vendor/pages/invoices.vue +43 -0
- package/app/components/catalog/vendor/pages/orders.vue +68 -0
- package/app/components/catalog/vendor/pages/products.vue +55 -0
- package/app/components/catalog/vendor/pages/reviews.vue +48 -0
- package/app/components/catalog/vendor/pages/shipments.vue +43 -0
- package/app/components/catalog/vendor/pages/stores.vue +43 -0
- package/app/components/content/blocks/breadcrumbs.vue +0 -0
- package/app/components/content/blocks/currencySwitcher.vue +0 -0
- package/app/components/content/blocks/languageSwitcher.vue +0 -0
- package/app/components/content/blocks/videoproduct.vue +9 -0
- package/app/components/content/pages/checkout.vue +118 -0
- package/app/components/content/pages/meeoviGlobal.vue +68 -0
- package/app/components/content/pages/pickup-locations.vue +238 -0
- package/app/components/content/pages/showcases.vue +90 -0
- package/app/components/content/pages/success.vue +60 -0
- package/app/components/marketing/add-brand.vue +54 -0
- package/app/components/marketing/add-incentive.vue +54 -0
- package/app/components/marketing/promotions/giftcards.vue +127 -0
- package/app/components/marketing/promotions/subscriptions.vue +134 -0
- package/app/components/marketing/update-incentive.vue +326 -0
- package/app/components/menus/lowernav.vue +78 -0
- package/app/components/partials/LocaleSelector.vue +24 -0
- package/app/components/partials/ShoppingCart.vue +128 -0
- package/app/components/partials/StripePayment.vue +149 -0
- package/app/components/partials/addToCartBtn.vue +40 -0
- package/app/components/partials/cartItem.vue +124 -0
- package/app/components/partials/checkoutButton.vue +44 -0
- package/app/components/partials/compareBtn.vue +68 -0
- package/app/components/partials/ratings.vue +13 -0
- package/app/components/partials/store/CurrencySelector.vue +133 -0
- package/app/components/partials/store/StoreSwitcher.vue +13 -0
- package/app/components/related/brandCard.vue +41 -0
- package/app/components/related/incentiveCard.vue +44 -0
- package/app/components/related/invoiceCard.vue +43 -0
- package/app/components/related/orderCard.vue +43 -0
- package/app/components/related/relatedproducts.vue +17 -0
- package/app/components/sales/CartPageContent/CartPageContent.vue +43 -0
- package/app/components/sales/CheckoutAddress/CheckoutAddress.vue +50 -0
- package/app/components/sales/CheckoutAddress/__tests__/CheckoutAddress.spec.ts +16 -0
- package/app/components/sales/CheckoutAddress/types.ts +16 -0
- package/app/components/sales/CheckoutPayment/CheckoutPayment.vue +65 -0
- package/app/components/sales/CheckoutPayment/__tests__/CheckoutPayment.spec.ts +14 -0
- package/app/components/sales/CheckoutPayment/types.ts +12 -0
- package/app/components/sales/OrderSummary/OrderSummary.vue +57 -0
- package/app/components/sales/OrderSummary/__tests__/ContactInformation.spec.ts +52 -0
- package/app/components/sales/OrderSummary/types.ts +5 -0
- package/app/components/sales/incentives.vue +247 -0
- package/app/components/sales/invoices.vue +107 -0
- package/app/components/sales/orders.vue +378 -0
- package/app/components/sales/shipments.vue +65 -0
- package/app/components/sales/transactions.vue +109 -0
- package/app/components/shop/add-shop.vue +54 -0
- package/app/components/shop/cart/cartItem.vue +182 -0
- package/app/components/shop/cart/checkout.vue +415 -0
- package/app/components/shop/checkout/StripeCardElement.vue +206 -0
- package/app/components/shop/checkout/StripeCheckout.vue +49 -0
- package/app/components/shop/checkout/addressBilling.vue +263 -0
- package/app/components/shop/checkout/addressShipping.vue +175 -0
- package/app/components/shop/checkout/cart/ProductItem.vue +56 -0
- package/app/components/shop/checkout/cart/PromotionItem.vue +53 -0
- package/app/composables/useCustomer/__tests__/useCustomer.spec.ts +1 -1
- package/app/composables/useProductReviews/__tests__/useProductReviews.spec.ts +1 -1
- package/app/stores/cart.ts +1 -1
- package/app/types/Direction.type.ts +1 -1
- package/app/types/Global.type.ts +6 -6
- package/app/types/Layout.type.ts +1 -1
- package/app/types/index.ts +1 -1
- package/app/{normalizers → types/normalizers}/Cart.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/Cart.type.ts +2 -2
- package/app/{normalizers → types/normalizers}/Checkout.query.ts +2 -2
- package/app/{normalizers → types/normalizers}/Config.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/Config.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/ContactForm.query.ts +2 -2
- package/app/{normalizers → types/normalizers}/CreditMemo.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/GiftCard.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/Invoice.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/MyAccount.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/MyAccount.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/NewsletterSubscription.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/Order.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/Order.type.ts +2 -2
- package/app/{normalizers → types/normalizers}/Payment.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/ProductCompare.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/ProductCompare.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/ProductList.query.ts +2 -2
- package/app/{normalizers → types/normalizers}/ProductList.type.ts +2 -2
- package/app/{normalizers → types/normalizers}/Return.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/Review.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/Review.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/StoreInPickUp.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/Subscription.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/Transaction.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/UrlRewrites.query.ts +1 -1
- package/app/{normalizers → types/normalizers}/UrlRewrites.type.ts +1 -1
- package/app/{normalizers → types/normalizers}/Wishlist.query.ts +4 -4
- package/app/{normalizers → types/normalizers}/Wishlist.type.ts +1 -1
- package/app/utils/Address/Address.type.ts +1 -1
- package/app/utils/Address/index.ts +5 -5
- package/app/utils/Cart/Cart.ts +1 -1
- package/app/utils/Currency/Currency.ts +1 -1
- package/app/utils/History/History.type.ts +1 -1
- package/app/utils/Menu/Menu.ts +1 -1
- package/app/utils/Menu/Menu.type.ts +2 -2
- package/app/utils/Orders/Orders.ts +1 -1
- package/app/utils/Preload/CategoryPreload.ts +2 -2
- package/app/utils/Preload/ProductPreload.ts +1 -1
- package/app/utils/Preload/index.ts +1 -1
- package/app/utils/Price/Price.ts +1 -1
- package/app/utils/Product/Extract.ts +1 -1
- package/app/utils/Product/Product.ts +1 -1
- package/app/utils/Product/Product.type.ts +1 -1
- package/app/utils/Product/Transform.ts +1 -1
- package/app/utils/Wishlist/Wishlist.ts +1 -1
- package/app/utils/client.ts +20 -20
- package/package.json +1 -3
- package/tsconfig.json +2 -2
- package/app/cart/useCart.ts +0 -1
- /package/app/{components → composables}/ChevronIcon/ChevronIcon.config.ts +0 -0
- /package/app/{components → composables}/DateSelect/DateSelect.config.ts +0 -0
- /package/app/{components → composables}/Field/Field.config.ts +0 -0
- /package/app/{components → composables}/FieldDate/FieldDate.config.ts +0 -0
- /package/app/{components → composables}/Form/Form.type.ts +0 -0
- /package/app/{components → composables}/Product/Product.config.ts +0 -0
- /package/app/{components → composables}/Product/Stock.config.ts +0 -0
- /package/app/{components → composables}/ProductCustomizableOption/ProductCustomizableOption.config.ts +0 -0
- /package/app/{components → composables}/ProductGallery/ProductGallery.config.ts +0 -0
- /package/app/{components → composables}/ProductReviews/ProductReviews.config.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Category.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Category.type.ts +0 -0
- /package/app/{normalizers → types/normalizers}/CheckEmail.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Checkout.type.ts +0 -0
- /package/app/{normalizers → types/normalizers}/CmsBlock.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/CmsBlock.type.ts +0 -0
- /package/app/{normalizers → types/normalizers}/CmsPage.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/CmsPage.type.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Menu.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Menu.type.ts +0 -0
- /package/app/{normalizers → types/normalizers}/ProductAlerts.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Region.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Region.type.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Slider.query.ts +0 -0
- /package/app/{normalizers → types/normalizers}/Slider.type.ts +0 -0
- /package/app/{normalizers → types/normalizers}/StoreInPickUp.type.ts +0 -0
- /package/app/{routes → types/routes}/CategoryPage/CategoryPage.config.ts +0 -0
- /package/app/{routes → types/routes}/CategoryPage/CategoryPage.type.ts +0 -0
- /package/app/{routes → types/routes}/Checkout/Checkout.config.ts +0 -0
- /package/app/{routes → types/routes}/Checkout/Checkout.type.ts +0 -0
- /package/app/{routes → types/routes}/MyAccount/MyAccount.config.ts +0 -0
- /package/app/{routes → types/routes}/SearchPage/SearchPage.config.ts +0 -0
- /package/app/{routes → types/routes}/UrlRewrites/UrlRewrites.config.ts +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row>
|
|
3
|
+
<v-col cols="12">
|
|
4
|
+
<h6>Color</h6>
|
|
5
|
+
</v-col>
|
|
6
|
+
|
|
7
|
+
<v-col cols="12">
|
|
8
|
+
<v-container>
|
|
9
|
+
<v-row>
|
|
10
|
+
<v-col cols="auto" v-for="color in colors" :key="color.id">
|
|
11
|
+
<v-btn density="compact" :style="`background-color: ${color.value || color.hex || color.name}`" :title="color.name"
|
|
12
|
+
@click="selectColor(color)">
|
|
13
|
+
</v-btn>
|
|
14
|
+
</v-col>
|
|
15
|
+
</v-row>
|
|
16
|
+
</v-container>
|
|
17
|
+
</v-col>
|
|
18
|
+
</v-row>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import { ref, onMounted } from 'vue'
|
|
23
|
+
const emit = defineEmits(['color-selected'])
|
|
24
|
+
const colors = ref([])
|
|
25
|
+
const selectedColor = ref(null)
|
|
26
|
+
|
|
27
|
+
const nuxtApp = useNuxtApp()
|
|
28
|
+
const { $directus, $readItems } = nuxtApp
|
|
29
|
+
|
|
30
|
+
const loadColors = async () => {
|
|
31
|
+
try {
|
|
32
|
+
const res = await $directus.request($readItems('attributes', {
|
|
33
|
+
filter: {
|
|
34
|
+
attribute_code: { _eq: 'color' }
|
|
35
|
+
},
|
|
36
|
+
sort: ['id']
|
|
37
|
+
}))
|
|
38
|
+
|
|
39
|
+
const attr = (res && res[0]) || null
|
|
40
|
+
const opts = attr?.options || []
|
|
41
|
+
// options may only have `name`; normalize to objects with id and value
|
|
42
|
+
colors.value = opts.map((o, i) => ({ id: `${attr?.id || 'color'}-${i}`, name: o.name, value: o.name }))
|
|
43
|
+
} catch (e) {
|
|
44
|
+
// eslint-disable-next-line no-console
|
|
45
|
+
console.warn('Failed to load color attributes', e)
|
|
46
|
+
colors.value = []
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const selectColor = (color) => {
|
|
51
|
+
selectedColor.value = color.value ?? color.id
|
|
52
|
+
emit('color-selected', color)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
onMounted(() => {
|
|
56
|
+
loadColors()
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<section data-bs-version="5.1" class="mbr-section features20 cid-txNnCwzel4" id="features20-4t"
|
|
4
|
+
data-sortbtn="btn-primary">
|
|
5
|
+
<div class="container-fluid">
|
|
6
|
+
<h2 class="mbr-section-title align-left mbr-fonts-style display-5">
|
|
7
|
+
Deals</h2>
|
|
8
|
+
<div class="underline align-left pb-3">
|
|
9
|
+
<div class="line"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<v-sheet class="mx-auto">
|
|
12
|
+
<v-slide-group v-model="model" class="pa-4" selected-class="bg-success" show-arrows>
|
|
13
|
+
<v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }"
|
|
14
|
+
v-for="(products, index) in deals" :key="index">
|
|
15
|
+
<productCard :product="products" :class="['ma-4', selectedClass]" @click="toggle" />
|
|
16
|
+
|
|
17
|
+
<div class="d-flex fill-height align-center justify-center">
|
|
18
|
+
<v-scale-transition>
|
|
19
|
+
<v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline" size="48"></v-icon>
|
|
20
|
+
</v-scale-transition>
|
|
21
|
+
</div>
|
|
22
|
+
</v-slide-group-item>
|
|
23
|
+
</v-slide-group>
|
|
24
|
+
</v-sheet>
|
|
25
|
+
</div>
|
|
26
|
+
</section>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup>
|
|
31
|
+
import productCard from './productCard.vue'
|
|
32
|
+
|
|
33
|
+
const model = ref(null)
|
|
34
|
+
const {
|
|
35
|
+
$directus,
|
|
36
|
+
$readItems
|
|
37
|
+
} = useNuxtApp()
|
|
38
|
+
|
|
39
|
+
const {
|
|
40
|
+
data: deals
|
|
41
|
+
} = await useAsyncData('deals', () => {
|
|
42
|
+
return $directus.request($readItems('products', {
|
|
43
|
+
fields: ['*',
|
|
44
|
+
'products.products_id.*',
|
|
45
|
+
'products.products_id.image.*',
|
|
46
|
+
'currency.currency_id.*',
|
|
47
|
+
'brands.brands_id.*',
|
|
48
|
+
'image.*',
|
|
49
|
+
],
|
|
50
|
+
limit: 10,
|
|
51
|
+
filter: {
|
|
52
|
+
price: {
|
|
53
|
+
_lte: "20.00"
|
|
54
|
+
},
|
|
55
|
+
status: {
|
|
56
|
+
_eq: "published"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}))
|
|
60
|
+
})
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<section data-bs-version="5.1" class="mbr-section features20 cid-txNnCwzel4" id="features20-4t"
|
|
4
|
+
data-sortbtn="btn-primary">
|
|
5
|
+
<div class="container-fluid">
|
|
6
|
+
<h2 class="mbr-section-title align-left mbr-fonts-style display-5">
|
|
7
|
+
Exclusives</h2>
|
|
8
|
+
<div class="underline align-left pb-3">
|
|
9
|
+
<div class="line"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<v-sheet class="mx-auto sliderProducts row align-items-stretch items-row justify-content-center">
|
|
12
|
+
<v-slide-group v-model="model" class="pa-4" selected-class="bg-success" show-arrows>
|
|
13
|
+
<v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }" v-for="(products, index) in exclusives"
|
|
14
|
+
:key="index">
|
|
15
|
+
<productCard :product="products?.products_id" :class="['ma-4', selectedClass]" @click="toggle" />
|
|
16
|
+
|
|
17
|
+
<div class="d-flex fill-height align-center justify-center">
|
|
18
|
+
<v-scale-transition>
|
|
19
|
+
<v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline" size="48"></v-icon>
|
|
20
|
+
</v-scale-transition>
|
|
21
|
+
</div>
|
|
22
|
+
</v-slide-group-item>
|
|
23
|
+
</v-slide-group>
|
|
24
|
+
</v-sheet>
|
|
25
|
+
</div>
|
|
26
|
+
</section>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup>
|
|
31
|
+
import productCard from './productCard.vue'
|
|
32
|
+
|
|
33
|
+
const model = ref(null);
|
|
34
|
+
const { $directus, $readItems, $commerce } = useNuxtApp()
|
|
35
|
+
|
|
36
|
+
const { data: exclusives } = await useAsyncData('exclusives', async () => {
|
|
37
|
+
const refs = await $directus.request($readItems('products', {
|
|
38
|
+
fields: ['id', 'sku'],
|
|
39
|
+
limit: 10,
|
|
40
|
+
filter: {
|
|
41
|
+
status: { _eq: 'published' },
|
|
42
|
+
departments: {
|
|
43
|
+
departments_id: { name: { _eq: 'Exclusives' } }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}))
|
|
47
|
+
|
|
48
|
+
const products = await Promise.all(refs.map(async (r) => {
|
|
49
|
+
try {
|
|
50
|
+
return await $commerce.getProduct(String(r.sku || r.id))
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return null
|
|
53
|
+
}
|
|
54
|
+
}))
|
|
55
|
+
|
|
56
|
+
return products.filter(Boolean)
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<section data-bs-version="5.1" class="mbr-section features20 cid-txNnCwzel4" id="features20-4t"
|
|
4
|
+
data-sortbtn="btn-primary">
|
|
5
|
+
<div class="container-fluid">
|
|
6
|
+
<h2 class="mbr-section-title align-left mbr-fonts-style display-5">
|
|
7
|
+
Featured Products</h2>
|
|
8
|
+
<div class="underline align-left pb-3">
|
|
9
|
+
<div class="line"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<v-sheet class="mx-auto">
|
|
12
|
+
<v-slide-group v-model="model" class="pa-4" show-arrows>
|
|
13
|
+
<v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }"
|
|
14
|
+
v-for="(products, index) in featured" :key="index">
|
|
15
|
+
<productCard :product="products" :class="['ma-4', selectedClass]" @click="toggle" />
|
|
16
|
+
|
|
17
|
+
<div class="d-flex fill-height align-center justify-center">
|
|
18
|
+
<v-scale-transition>
|
|
19
|
+
<v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline" size="48"></v-icon>
|
|
20
|
+
</v-scale-transition>
|
|
21
|
+
</div>
|
|
22
|
+
</v-slide-group-item>
|
|
23
|
+
</v-slide-group>
|
|
24
|
+
</v-sheet>
|
|
25
|
+
</div>
|
|
26
|
+
</section>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup>
|
|
31
|
+
import productCard from './productCard.vue'
|
|
32
|
+
|
|
33
|
+
const model = ref(null);
|
|
34
|
+
const {
|
|
35
|
+
$directus,
|
|
36
|
+
$readItems
|
|
37
|
+
} = useNuxtApp()
|
|
38
|
+
|
|
39
|
+
const {
|
|
40
|
+
data: featured
|
|
41
|
+
} = await useAsyncData('featured', () => {
|
|
42
|
+
return $directus.request($readItems('products', {
|
|
43
|
+
fields: ['*',
|
|
44
|
+
'products.products_id.*',
|
|
45
|
+
'products.products_id.image.*',
|
|
46
|
+
'currency.currency_id.*',
|
|
47
|
+
'brands.brands_id.*',
|
|
48
|
+
'image.*',
|
|
49
|
+
],
|
|
50
|
+
limit: 10,
|
|
51
|
+
filter: {
|
|
52
|
+
lists: {
|
|
53
|
+
lists_id: {
|
|
54
|
+
lists_types: {
|
|
55
|
+
lists_types_id: {
|
|
56
|
+
name: {
|
|
57
|
+
_eq: "Featured"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
status: {
|
|
64
|
+
_eq: "published"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}))
|
|
68
|
+
})
|
|
69
|
+
</script>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!---->
|
|
4
|
+
<v-row class="giftCardSection">
|
|
5
|
+
<v-col cols="12">
|
|
6
|
+
<h2>{{ callouts?.menus?.[3]?.name }}</h2>
|
|
7
|
+
</v-col>
|
|
8
|
+
|
|
9
|
+
<v-col cols="12">
|
|
10
|
+
<v-row>
|
|
11
|
+
<v-col cols="6"><v-text-field class="giftcardfield"
|
|
12
|
+
:label="callouts?.menus?.[4]?.name"></v-text-field></v-col>
|
|
13
|
+
<v-col cols="6"><v-btn class="giftcardbtn" color="orange" size="x-large" type="submit"
|
|
14
|
+
variant="elevated">{{ callouts?.menus?.[5]?.name }}</v-btn></v-col>
|
|
15
|
+
</v-row>
|
|
16
|
+
|
|
17
|
+
<v-expansion-panels>
|
|
18
|
+
<v-expansion-panel :title="callouts?.menus?.[6]?.name" :text="callouts?.menus?.[6]?.description">
|
|
19
|
+
</v-expansion-panel>
|
|
20
|
+
</v-expansion-panels>
|
|
21
|
+
</v-col>
|
|
22
|
+
|
|
23
|
+
<v-col cols="12">
|
|
24
|
+
<h2>{{ callouts?.menus?.[7]?.name }} {{ gift?.amount }}</h2>
|
|
25
|
+
<NuxtLink :to="`/commerce/giftcard/${gift?.id}`">{{ callouts?.menus?.[8]?.name }}</NuxtLink>
|
|
26
|
+
</v-col>
|
|
27
|
+
<v-divider></v-divider>
|
|
28
|
+
|
|
29
|
+
<v-col cols="12">
|
|
30
|
+
<p></p>
|
|
31
|
+
</v-col>
|
|
32
|
+
<v-divider></v-divider>
|
|
33
|
+
</v-row>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup>
|
|
38
|
+
const props = defineProps({
|
|
39
|
+
gift: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const {
|
|
46
|
+
$directus,
|
|
47
|
+
$readItem
|
|
48
|
+
} = useNuxtApp()
|
|
49
|
+
|
|
50
|
+
const {
|
|
51
|
+
data: callouts
|
|
52
|
+
} = await useAsyncData('callouts', () => {
|
|
53
|
+
return $directus.request($readItem('callouts', '4'))
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
useHead({
|
|
57
|
+
title: 'Redeem an Meeovi Gift Card'
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
definePageMeta({
|
|
61
|
+
middleware: ['authenticated'],
|
|
62
|
+
})
|
|
63
|
+
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<section data-bs-version="5.1" class="mbr-section features20 cid-txNnCwzel4" id="features20-4t"
|
|
4
|
+
data-sortbtn="btn-primary">
|
|
5
|
+
<div class="container-fluid">
|
|
6
|
+
<h2 class="mbr-section-title align-left mbr-fonts-style display-5">
|
|
7
|
+
Latest Products</h2>
|
|
8
|
+
<div class="underline align-left pb-3">
|
|
9
|
+
<div class="line"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<v-sheet class="mx-auto">
|
|
12
|
+
<v-slide-group v-model="model" class="pa-4" show-arrows>
|
|
13
|
+
<v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }" v-for="(products, index) in latest" :key="index">
|
|
14
|
+
<productCard :product="products" :class="['ma-4', selectedClass]" @click="toggle" />
|
|
15
|
+
|
|
16
|
+
<div class="d-flex fill-height align-center justify-center">
|
|
17
|
+
<v-scale-transition>
|
|
18
|
+
<v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline" size="48"></v-icon>
|
|
19
|
+
</v-scale-transition>
|
|
20
|
+
</div>
|
|
21
|
+
</v-slide-group-item>
|
|
22
|
+
</v-slide-group>
|
|
23
|
+
</v-sheet>
|
|
24
|
+
</div>
|
|
25
|
+
</section>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import productCard from './productCard.vue'
|
|
31
|
+
|
|
32
|
+
const model = ref(null);
|
|
33
|
+
const {
|
|
34
|
+
$directus,
|
|
35
|
+
$readItems
|
|
36
|
+
} = useNuxtApp()
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
data: latest
|
|
40
|
+
} = await useAsyncData('latest', () => {
|
|
41
|
+
return $directus.request($readItems('products', {
|
|
42
|
+
fields: ['*',
|
|
43
|
+
'products.products_id.*',
|
|
44
|
+
'products.products_id.image.*',
|
|
45
|
+
'currency.currency_id.*',
|
|
46
|
+
'brands.brands_id.*',
|
|
47
|
+
'image.*',
|
|
48
|
+
],
|
|
49
|
+
filter: {
|
|
50
|
+
status: {
|
|
51
|
+
_eq: 'published'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
sort: '-products_id.date_created',
|
|
55
|
+
limit: 10,
|
|
56
|
+
}))
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="border border-neutral-200 rounded-md hover:shadow-lg max-w-[300px]">
|
|
4
|
+
<div class="relative" v-if="product?.image?.length > 0">
|
|
5
|
+
<NuxtLink :to="`/product/${product?.id}`" class="block">
|
|
6
|
+
<img :src="`${$directus.url}assets/${product?.image?.filename_disk}`" :alt="product?.name"
|
|
7
|
+
class="block object-cover h-auto rounded-md aspect-square" width="300" height="300" />
|
|
8
|
+
</NuxtLink>
|
|
9
|
+
<v-btn variant="flat" size="sm" square
|
|
10
|
+
class="absolute bottom-0 right-0 mr-2 mb-2 bg-white ring-1 ring-inset ring-neutral-200 rounded-full!"
|
|
11
|
+
aria-label="Add to wishlist">
|
|
12
|
+
<v-icon icon="fas fa-heart" size="sm"></v-icon>
|
|
13
|
+
</v-btn>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="relative" v-else>
|
|
17
|
+
<NuxtLink :to="`/product/${product?.id}`" class="block">
|
|
18
|
+
<img src="~/assets/images/mbr-1920x1893.png" :alt="product?.name"
|
|
19
|
+
class="block object-cover h-auto rounded-md aspect-square" width="300" height="300" />
|
|
20
|
+
</NuxtLink>
|
|
21
|
+
<v-btn variant="flat" size="sm" square
|
|
22
|
+
class="absolute bottom-0 right-0 mr-2 mb-2 bg-white ring-1 ring-inset ring-neutral-200 rounded-full!"
|
|
23
|
+
aria-label="Add to wishlist">
|
|
24
|
+
<v-icon icon="fas fa-heart" size="sm"></v-icon>
|
|
25
|
+
</v-btn>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="p-4 border-t border-neutral-200" style="background-color: white !important;">
|
|
28
|
+
<NuxtLink :to="`/product/${product?.id}`" variant="secondary" class="no-underline"> {{ product?.name }}
|
|
29
|
+
</NuxtLink>
|
|
30
|
+
<div class="flex items-center pt-1">
|
|
31
|
+
<v-rating size="xs" active-color="warning" :model-value="product?.rating" :max="5" />
|
|
32
|
+
|
|
33
|
+
<NuxtLink :to="`/product/${product?.id}`" variant="secondary" class="pl-1 no-underline">
|
|
34
|
+
<v-chip size="xs">{{ product?.rating }}</v-chip>
|
|
35
|
+
</NuxtLink>
|
|
36
|
+
</div>
|
|
37
|
+
<p class="block py-2 font-normal leading-5 typography-text-sm text-neutral-700"
|
|
38
|
+
v-if="product?.brands.length > 0">
|
|
39
|
+
By:
|
|
40
|
+
<div style="display: inline-block;" v-for="brands in product?.brands" :key="brands">
|
|
41
|
+
<NuxtLink :to="`/brand/${brands?.brands_id?.slug}`">{{ brands?.brands_id?.name }}</NuxtLink></div>
|
|
42
|
+
</p>
|
|
43
|
+
<span class="block pb-2 font-bold typography-text-lg">
|
|
44
|
+
<div style="display: inline-block;" v-for="currency in product?.currency" :key="currency">
|
|
45
|
+
{{ currency?.currency_id?.symbol }}
|
|
46
|
+
</div>
|
|
47
|
+
{{ product?.price }}
|
|
48
|
+
</span>
|
|
49
|
+
<!--<v-btn size="sm">
|
|
50
|
+
<template #prefix>
|
|
51
|
+
<SfIconShoppingCart size="sm" />
|
|
52
|
+
</template>
|
|
53
|
+
Add to cart
|
|
54
|
+
</v-btn>-->
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup>
|
|
61
|
+
const {
|
|
62
|
+
$directus
|
|
63
|
+
} = useNuxtApp()
|
|
64
|
+
|
|
65
|
+
const props = defineProps({
|
|
66
|
+
product: {
|
|
67
|
+
type: Object,
|
|
68
|
+
required: true,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- pages/compare.vue -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="product-compare-page">
|
|
4
|
+
<productCard
|
|
5
|
+
:is-loading="isLoading"
|
|
6
|
+
/>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import { onMounted } from 'vue'
|
|
12
|
+
import { useRouter } from 'vue-router'
|
|
13
|
+
import { useCompareStore } from '~/stores/compare'
|
|
14
|
+
import { useMetaStore } from '~/stores/meta'
|
|
15
|
+
import { useNavigationStore } from '~/stores/navigation'
|
|
16
|
+
import { useBreadcrumbsStore } from '~/stores/breadcrumbs'
|
|
17
|
+
|
|
18
|
+
const router = useRouter()
|
|
19
|
+
const compareStore = useCompareStore()
|
|
20
|
+
const metaStore = useMetaStore()
|
|
21
|
+
const navigationStore = useNavigationStore()
|
|
22
|
+
const breadcrumbsStore = useBreadcrumbsStore()
|
|
23
|
+
|
|
24
|
+
const isLoading = computed(() => compareStore.getIsLoading)
|
|
25
|
+
|
|
26
|
+
// Methods converted from the container class
|
|
27
|
+
const updateMeta = () => {
|
|
28
|
+
metaStore.setMeta({
|
|
29
|
+
title: 'Product Compare',
|
|
30
|
+
description: 'Compare products and find the best one for you.',
|
|
31
|
+
keywords: 'product comparison, compare products, find the best deal'
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
breadcrumbsStore.updateBreadcrumbs = () => {
|
|
36
|
+
const breadcrumbs = [{
|
|
37
|
+
url: '/compare',
|
|
38
|
+
name: 'Product Compare'
|
|
39
|
+
}]
|
|
40
|
+
breadcrumbsStore.updateBreadcrumbs(breadcrumbs)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const updateHeaderState = () => {
|
|
44
|
+
navigationStore.addNavigationItem({
|
|
45
|
+
name: 'PRODUCT_COMPARE',
|
|
46
|
+
title: 'Compare',
|
|
47
|
+
onBack: () => router.back()
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Lifecycle hook (equivalent to componentDidMount)
|
|
52
|
+
onMounted(() => {
|
|
53
|
+
// Scroll to top
|
|
54
|
+
window.scrollTo({ top: 0 })
|
|
55
|
+
|
|
56
|
+
updateMeta()
|
|
57
|
+
updateBreadcrumbs()
|
|
58
|
+
updateHeaderState()
|
|
59
|
+
})
|
|
60
|
+
</script>
|