tmp
parent
7a790d9211
commit
cc9cfe9baa
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue