Integrazione ECommerce (conversione)

This commit is contained in:
Surya Paolo
2023-11-27 14:40:42 +01:00
parent 6b400448d4
commit f1702d76d6
42 changed files with 1028 additions and 370 deletions

View File

@@ -0,0 +1,5 @@
$heightBtn: 100%;
.card .product-image {
height: 300px;
}

View File

@@ -0,0 +1,59 @@
import { defineComponent, onMounted, ref } from 'vue'
import { tools } from '@store/Modules/tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { CProductCard } from '@src/components/CProductCard'
export default defineComponent({
name: 'CartList',
components: { CProductCard },
filters: {
capitalize(value: any) {
if (!value) {
return ''
}
value = value.toString()
return value.charAt(0).toUpperCase() + value.slice(1)
}
},
props: {},
setup() {
const userStore = useUserStore()
const globalStore = useGlobalStore()
const productStore = useProducts()
const $router = useRouter()
const $q = useQuasar()
const { t } = useI18n();
function getCart() {
return productStore.getCart()
}
function getProducts() {
return productStore.getProducts()
}
function mounted() {
// Inizializza
}
onMounted(mounted)
return {
userStore,
costanti,
tools,
toolsext,
getCart,
getProducts,
}
}
})

View File

@@ -0,0 +1,21 @@
<template>
<q-page>
<div class="panel">
<div class="container">
<div class="row">
<div class="q-pa-md row items-start q-gutter-md" v-for="(product, index) in getProducts" :key="index">
<CProductCard :product="product"/>
</div>
</div>
</div>
</div>
</q-page>
</template>
<script lang="ts" src="./cartList.ts">
</script>
<style lang="scss" scoped>
@import './cartList';
</style>

View File

@@ -0,0 +1 @@
export {default as CartList} from './cartList.vue'