pull/1/head
Kar 2022-09-21 23:32:09 +05:30
parent 7a790d9211
commit cc9cfe9baa
1 changed files with 26 additions and 30 deletions

View File

@ -1,8 +1,11 @@
<template>
<v-container mt-4 style="padding-bottom:120px;">
<!-- <v-card class="bg mb-5" v-show="calculateCart"> -->
<v-card class="bg mb-5" >
<v-card v-for="item in cartBag" :key="item.slug">
<div class="bg mb-5" >
<v-row>
<v-col v-for="item in cartBag" :key="item.slug" sm="6" lg="4" xl="3">
<v-card>
<div>
<div>
<v-avatar class="ma-3" size="125" tile>
@ -11,38 +14,19 @@
<v-card-title class="text-h5" v-text="item.product.name"></v-card-title>
<v-card-subtitle v-text="item.product.name"></v-card-subtitle>
<!-- <v-card-actions>
<v-btn
v-if="item.artist === 'Ellie Goulding'"
class="ml-2 mt-3"
fab
icon
height="40px"
right
width="40px"
>
<v-icon>mdi-play</v-icon>
</v-btn>
<v-btn
v-else
class="ml-2 mt-5"
outlined
rounded
big
>
</v-btn>
</v-card-actions>-->
<v-card-subtitle v-text="item.product.price"></v-card-subtitle>
<v-btn @click="cartRemoveItem(item.product.slug)"> </v-btn>
</div>
</div>
</v-card>
</v-card>
</v-col>
</v-row>
<div v-if="bagTotalPrice>0" >
<h2 > {{bagTotalPrice}} /- </h2>
<v-btn @click="cartEmpty()">
সব
</v-btn>
<v-btn>
<nuxt-link to="/purchase">এগি </nuxt-link>
@ -51,7 +35,7 @@
</div>
<h2 v-else > </h2>
</v-card>
</div>
<v-btn>
<nuxt-link to="/">আরও িনব</nuxt-link>
</v-btn>
@ -115,6 +99,18 @@ export default {
this.$router.go(0);
},
cartRemoveItem(itemslug) {
// alert(itemslug)
var json = localStorage.cart;
// var key = "foo";
delete json[itemslug];
localStorage.cart =json;
// localStorage.cart = '[]';
// this.$forceUpdate();
this.$router.go(0);
},
calculateCart(){
if (localStorage && localStorage.cart) {