2021-09-02 03:22:13 +02:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div id="mycontainer">
|
|
|
|
|
<div class="myheader row justify-between">
|
|
|
|
|
<div class="col-6">
|
2025-06-12 10:08:07 +02:00
|
|
|
<!--<q-btn
|
|
|
|
|
class="q-mx-xs"
|
|
|
|
|
round
|
|
|
|
|
dense
|
|
|
|
|
flat
|
|
|
|
|
icon="fas fa-shopping-cart"
|
|
|
|
|
>
|
2023-12-28 00:50:42 +01:00
|
|
|
<q-badge
|
|
|
|
|
v-if="getnumItemsCart() > 0"
|
|
|
|
|
color="red"
|
|
|
|
|
floating
|
|
|
|
|
transparent
|
|
|
|
|
>
|
2021-09-16 21:08:02 +02:00
|
|
|
{{ getnumItemsCart() }}
|
2021-09-02 03:22:13 +02:00
|
|
|
</q-badge>
|
2025-06-12 10:08:07 +02:00
|
|
|
</q-btn>-->
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
2025-06-12 10:08:07 +02:00
|
|
|
<div
|
|
|
|
|
v-if="totalPriceIntero"
|
|
|
|
|
class="q-mr-sm"
|
|
|
|
|
>
|
|
|
|
|
<table class="table">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{{ $t('ecomm.prezzointero') }}:</td>
|
|
|
|
|
<td
|
|
|
|
|
class="value text-subtitle1 text-right"
|
|
|
|
|
:class="{ 'text-strike': myTotalPrice !== totalPriceIntero }"
|
|
|
|
|
>
|
|
|
|
|
€ {{ totalPriceIntero }}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr v-if="myCart.codice_sconto">
|
|
|
|
|
<td class="label">{{ $t('ecomm.sconto_appl') }}:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div class="column items-center">
|
|
|
|
|
<q-chip
|
|
|
|
|
square
|
|
|
|
|
color="orange"
|
|
|
|
|
text-color="white"
|
|
|
|
|
size="md"
|
|
|
|
|
icon="fas fa-tag"
|
|
|
|
|
>
|
|
|
|
|
<span class="sconto-text">{{ myCart.descr_sconto }}</span>
|
|
|
|
|
</q-chip>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr v-if="!myCart.codice_sconto">
|
|
|
|
|
<td class="label">{{ $t('ecomm.codice_sconto') }}:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<q-input
|
|
|
|
|
v-model="codice_sconto"
|
|
|
|
|
:label="$t('ecomm.codice_sconto')"
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
filled
|
|
|
|
|
dense
|
|
|
|
|
@keyup.enter="confermaCodiceSconto"
|
|
|
|
|
/>
|
|
|
|
|
<q-btn
|
|
|
|
|
:disabled="!codice_sconto || codice_sconto.trim() === ''"
|
|
|
|
|
:label="$t('ecomm.applica_sconto')"
|
|
|
|
|
icon="fas fa-check-circle"
|
|
|
|
|
color="primary"
|
|
|
|
|
class="q-mt-sm self-center"
|
|
|
|
|
@click="confermaCodiceSconto"
|
|
|
|
|
/>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{{ $t('ecomm.totale_scontato') }}:</td>
|
|
|
|
|
<td class="ordine_scontato_nuovo text-right">€ {{ myTotalPrice }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<q-separator></q-separator>
|
|
|
|
|
<div id="mybody">
|
2025-06-12 10:08:07 +02:00
|
|
|
<div
|
|
|
|
|
v-for="(rec, index) in ordersCart"
|
|
|
|
|
:key="index"
|
|
|
|
|
class="col"
|
|
|
|
|
>
|
|
|
|
|
<CSingleCart
|
|
|
|
|
:order="rec.order"
|
|
|
|
|
:showall="false"
|
|
|
|
|
:idOrdersCart="ordersCart ? ordersCart._id : ''"
|
|
|
|
|
>
|
|
|
|
|
</CSingleCart>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-06-12 10:08:07 +02:00
|
|
|
<div
|
|
|
|
|
v-if="numOrders === 0"
|
|
|
|
|
style="text-align: center"
|
|
|
|
|
class="text-grey"
|
|
|
|
|
>
|
2023-12-15 21:50:28 +01:00
|
|
|
{{ $t('ecomm.carrello_vuoto') }}
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
2025-06-12 10:08:07 +02:00
|
|
|
<div
|
|
|
|
|
v-else
|
|
|
|
|
style="text-align: center"
|
|
|
|
|
>
|
2023-12-18 15:21:12 +01:00
|
|
|
<div class="text-center">
|
2023-12-28 00:50:42 +01:00
|
|
|
<q-btn
|
|
|
|
|
rounded
|
|
|
|
|
icon="fas fa-shopping-cart"
|
|
|
|
|
color="primary"
|
2024-01-13 00:29:02 +01:00
|
|
|
:label="t('ecomm.btn_cassa')"
|
2023-12-28 00:50:42 +01:00
|
|
|
@click="globalStore.rightCartOpen = false"
|
|
|
|
|
class="q-mb-sm"
|
|
|
|
|
to="/checkout"
|
|
|
|
|
>
|
2023-12-18 15:21:12 +01:00
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
2023-12-28 00:50:42 +01:00
|
|
|
<div class="text-center">
|
|
|
|
|
<q-btn
|
|
|
|
|
v-if="existsOrders()"
|
|
|
|
|
rounded
|
2025-06-11 01:05:20 +02:00
|
|
|
outline
|
2023-12-28 00:50:42 +01:00
|
|
|
icon="fas fa-clipboard-list"
|
2025-06-12 10:08:07 +02:00
|
|
|
style="color: green"
|
2024-01-13 00:29:02 +01:00
|
|
|
:label="t('ecomm.btn_ordini')"
|
2023-12-28 00:50:42 +01:00
|
|
|
class="q-mb-sm"
|
|
|
|
|
@click="globalStore.rightCartOpen = false"
|
|
|
|
|
to="/orderinfo"
|
|
|
|
|
>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-06-12 10:08:07 +02:00
|
|
|
<script lang="ts" src="./CMyCart.ts"></script>
|
2021-09-02 03:22:13 +02:00
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import './CMyCart.scss';
|
|
|
|
|
</style>
|