Something went wrong. Try again.
An E-Commerce Website built using Vue.js, Firebase Technologies: Firebase Authentication, Firebase Realtime Database, Firestore, and Fireba… cipher-vue-shop.web.app
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263<template> <div class="MiniCart">
<div class="modal fade" id="miniCart" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">My Bag</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div>
<div class="modal-body"> <ul> <li v-for="item in this.$store.state.cart" class="media my-3"> <img :src="item.productImage" width="80px" class="align-self-center mr-3" alt=""> <div class="mr-3 media-body"> <h5 class="mt-0">{{item.productName}} <span class='btn float-right' @click="$store.commit('removeFromCart',item)">×</span> </h5> <p class="mt-0">₹ {{item.productPrice}}</p> <p class="mt-0">Quantity : {{item.productQuantity }}</p> </div> </li> </ul> </div>
<div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Continue Shopping</button> <button type="button" @click="checkout()" class="btn btn-primary">Checkout</button> </div> </div> </div> </div>
</div></template>
<script> export default { name: "MiniCart", props: { msg: String }, methods: {
checkout() { $('#miniCart').modal('hide') this.$router.push('/checkout') }
} };</script>
<!-- Add "scoped" attribute to limit CSS to this component only --><style scoped lang="scss">
</style>