diff --git a/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php b/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php index fe8a5a6..2e273b9 100755 --- a/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php +++ b/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php @@ -57,7 +57,7 @@ class Controllerextensiontgshophandle extends Controller }); $app->bind(ImageToolInterface::class, function () { - return new ImageTool(DIR_IMAGE); + return new ImageTool(DIR_IMAGE, HTTPS_SERVER); }); $this->load->model('checkout/order'); diff --git a/spa/src/components/Quantity.vue b/spa/src/components/Quantity.vue new file mode 100644 index 0000000..40b0128 --- /dev/null +++ b/spa/src/components/Quantity.vue @@ -0,0 +1,29 @@ + + + diff --git a/spa/src/stores/CartStore.js b/spa/src/stores/CartStore.js index bce632e..bf45d7c 100644 --- a/spa/src/stores/CartStore.js +++ b/spa/src/stores/CartStore.js @@ -23,5 +23,21 @@ export const useCartStore = defineStore('cart', { options: options, }); }, + + removeProduct(productId) { + this.items.splice(this.items.indexOf(productId), 1); + }, + + getQuantity(productId) { + if (this.hasProduct(productId)) { + return this.getProduct(productId).quantity; + } + + return 0; + }, + + setQuantity(productId, quantity) { + this.getProduct(productId).quantity = quantity; + } }, }); \ No newline at end of file diff --git a/spa/src/views/Product.vue b/spa/src/views/Product.vue index 878bee9..277c302 100644 --- a/spa/src/views/Product.vue +++ b/spa/src/views/Product.vue @@ -4,7 +4,8 @@ -
+

{{ product.name }}

@@ -32,68 +33,80 @@
+ +
+ + + +