diff --git a/resources/assets/js/views/modules/item.js b/resources/assets/js/views/modules/item.js index 6e131983f..5a8083efd 100644 --- a/resources/assets/js/views/modules/item.js +++ b/resources/assets/js/views/modules/item.js @@ -70,6 +70,36 @@ const app = new Vue({ }, methods: { + addToCart(alias, subscription_type) { + let add_to_cart_promise = Promise.resolve(axios.get(url + '/apps/' + alias + '/' + subscription_type +'/add')); + + add_to_cart_promise.then(response => { + if (response.data.success) { + this.$notify({ + message: response.data.message, + timeout: 0, + icon: "fas fa-bell", + type: 'success' + }); + } + + if (response.data.error) { + this.installation.status = 'exception'; + this.installation.html = '