summaryrefslogtreecommitdiff
path: root/iridescence/src/components/cart/CartItem.vue
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-12-03 19:25:12 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-12-03 19:25:12 -0500
commitd8d44376d193d925582a0a12373e1403df49cf63 (patch)
tree3c7d2422ad000efb606d7a0995c089f4db56b237 /iridescence/src/components/cart/CartItem.vue
parent8280cf98c9a33613c7440442b73636e39dd297bc (diff)
downloadtheglassyladies-d8d44376d193d925582a0a12373e1403df49cf63.tar.xz
theglassyladies-d8d44376d193d925582a0a12373e1403df49cf63.zip
basic cart subtotaling, sidebar with total and checkout controls, better
navbar cart buttons
Diffstat (limited to 'iridescence/src/components/cart/CartItem.vue')
-rw-r--r--iridescence/src/components/cart/CartItem.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/iridescence/src/components/cart/CartItem.vue b/iridescence/src/components/cart/CartItem.vue
index 2c7655a..e31a109 100644
--- a/iridescence/src/components/cart/CartItem.vue
+++ b/iridescence/src/components/cart/CartItem.vue
@@ -19,6 +19,7 @@
</div>
</div>
<div class="level-right">
+ <div class="level-item">Subtotal: {{ dollars }}</div>
<div class="level-item">
<div class="field has-addons">
<p class="control is-expanded">
@@ -44,8 +45,9 @@
</div>
</div>
</div>
+
<div class="level-item">
- <button class="button is-outlined is-danger">
+ <button class="button is-outlined is-danger" @click="removeAll">
Remove
</button>
</div>
@@ -78,6 +80,9 @@ export default {
methods: {
incrementCartQuantity(by) {
this.$store.commit("cartItem", { id: this.id, by });
+ },
+ removeAll() {
+ this.$store.commit("removeItemFromCart", this.id);
}
}
};