From f5cac7d566c955155a4deb3ad05889ecec7f48fa Mon Sep 17 00:00:00 2001 From: Nikita Kiselev Date: Wed, 23 Jul 2025 19:05:48 +0300 Subject: [PATCH] wip: deal with totals --- .../controller/extension/tgshop/handle.php | 2 ++ spa/src/views/Cart.vue | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) 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 8420e35..e964c02 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 @@ -264,9 +264,11 @@ class Controllerextensiontgshophandle extends Controller } $data['total_products_count'] = $this->cart->countProducts(); + $data['total'] = $this->cart->getTotal(); } else { $data['text_error'] = $this->language->get('text_empty'); $data['totals'] = []; + $data['total'] = 0; $data['products'] = []; $data['total_products_count'] = 0; unset($this->session->data['success']); diff --git a/spa/src/views/Cart.vue b/spa/src/views/Cart.vue index f7ffa53..058c5d4 100644 --- a/spa/src/views/Cart.vue +++ b/spa/src/views/Cart.vue @@ -77,16 +77,16 @@ -
-
-
- {{ lastTotal.title }}:
- - {{ lastTotal.text }} -
-
+
+ + + + + + + - +