From 0305c1e114011ba7e1074dc651a1c5de9ea9f675 Mon Sep 17 00:00:00 2001 From: TheCartpenter Date: Tue, 26 Mar 2024 11:18:11 -0400 Subject: [PATCH 1/3] Removed extra lines --- upload/admin/controller/marketplace/modification.php | 1 - upload/admin/model/localisation/length_class.php | 1 - upload/admin/model/user/api.php | 1 - upload/catalog/controller/checkout/cart.php | 2 -- 4 files changed, 5 deletions(-) diff --git a/upload/admin/controller/marketplace/modification.php b/upload/admin/controller/marketplace/modification.php index ee3d0c66c8b..82ad53530e9 100644 --- a/upload/admin/controller/marketplace/modification.php +++ b/upload/admin/controller/marketplace/modification.php @@ -347,7 +347,6 @@ public function refresh(): void { } else { // Log $log[] = PHP_EOL . 'FILE: (sub modification) ' . $key; - } foreach ($operations as $operation) { diff --git a/upload/admin/model/localisation/length_class.php b/upload/admin/model/localisation/length_class.php index 2f698359293..c93ac09324b 100644 --- a/upload/admin/model/localisation/length_class.php +++ b/upload/admin/model/localisation/length_class.php @@ -154,7 +154,6 @@ public function getLengthClass(int $length_class_id): array { */ public function addDescription(int $length_class_id, int $language_id, array $data): void { $this->db->query("INSERT INTO `" . DB_PREFIX . "length_class_description` SET `length_class_id` = '" . (int)$length_class_id . "', `language_id` = '" . (int)$language_id . "', `title` = '" . $this->db->escape($data['title']) . "', `unit` = '" . $this->db->escape($data['unit']) . "'"); - } /** diff --git a/upload/admin/model/user/api.php b/upload/admin/model/user/api.php index adafab3988f..a86e124c95f 100644 --- a/upload/admin/model/user/api.php +++ b/upload/admin/model/user/api.php @@ -60,7 +60,6 @@ public function editApi(int $api_id, array $data): void { */ public function deleteApi(int $api_id): void { $this->db->query("DELETE FROM `" . DB_PREFIX . "api` WHERE `api_id` = '" . (int)$api_id . "'"); - } /** diff --git a/upload/catalog/controller/checkout/cart.php b/upload/catalog/controller/checkout/cart.php index 5c2ae58c766..2fea2904a0e 100644 --- a/upload/catalog/controller/checkout/cart.php +++ b/upload/catalog/controller/checkout/cart.php @@ -30,9 +30,7 @@ public function index(): void { if (!$this->cart->hasStock() && (!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning'))) { $data['error_warning'] = $this->language->get('error_stock'); } elseif (!$this->cart->hasMinimum()) { - $data['error_warning'] = $this->language->get('error_minimum'); - } elseif (isset($this->session->data['error'])) { $data['error_warning'] = $this->session->data['error']; From 6f29e8447ed937248b75bde4e86e0972bd8ca0dd Mon Sep 17 00:00:00 2001 From: TheCartpenter Date: Tue, 26 Mar 2024 21:02:42 -0400 Subject: [PATCH 2/3] Aligned if statement in order_info TWIG file --- upload/admin/view/template/sale/order_info.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload/admin/view/template/sale/order_info.twig b/upload/admin/view/template/sale/order_info.twig index f85a88901bb..76a05d8dabf 100644 --- a/upload/admin/view/template/sale/order_info.twig +++ b/upload/admin/view/template/sale/order_info.twig @@ -80,9 +80,9 @@ {% for option in order_product.option %}
{% if option.type != 'file' %} - - {{ option.name }}: {{ option.value }} + - {{ option.name }}: {{ option.value }} {% else %} - - {{ option.name }}: {{ option.value }} {% endif %} + - {{ option.name }}: {{ option.value }} {% endif %} {% endfor %} {% endif %} From fc1d3c4bb547adaa0f23f63e2541ebcc8670849a Mon Sep 17 00:00:00 2001 From: TheCartpenter Date: Tue, 26 Mar 2024 21:11:33 -0400 Subject: [PATCH 3/3] Added backticks on getTotalReward method --- upload/admin/model/sale/order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/admin/model/sale/order.php b/upload/admin/model/sale/order.php index 862d8fa3935..181303f48bf 100644 --- a/upload/admin/model/sale/order.php +++ b/upload/admin/model/sale/order.php @@ -652,7 +652,7 @@ public function createInvoiceNo(int $order_id): string { * @return int */ public function getRewardTotal(int $order_id): int { - $query = $this->db->query("SELECT SUM(reward) AS `total` FROM `" . DB_PREFIX . "order_product` WHERE `order_id` = '" . (int)$order_id . "'"); + $query = $this->db->query("SELECT SUM(`reward`) AS `total` FROM `" . DB_PREFIX . "order_product` WHERE `order_id` = '" . (int)$order_id . "'"); return (int)$query->row['total']; }