aboutsummaryrefslogtreecommitdiff
path: root/client/src/views/Product.vue
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/views/Product.vue')
-rw-r--r--client/src/views/Product.vue6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/views/Product.vue b/client/src/views/Product.vue
index 3c35b35..11643c1 100644
--- a/client/src/views/Product.vue
+++ b/client/src/views/Product.vue
@@ -46,7 +46,11 @@ export default {
},
methods: {
buy() {
-
+ this.$store.commit('addToCart', {
+ _id: this.$route.params.id,
+ name: this.productName,
+ price: this.productPrice
+ });
}
}
}