From a7f9b9f1d2321cd983910082e0a28e9682a3f8e4 Mon Sep 17 00:00:00 2001 From: TheCartpenter Date: Fri, 23 Aug 2024 08:36:13 -0400 Subject: [PATCH] Fixed extension/dashboard/map total orders by country model --- upload/admin/model/extension/dashboard/map.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/admin/model/extension/dashboard/map.php b/upload/admin/model/extension/dashboard/map.php index a176beb28..d345e20db 100644 --- a/upload/admin/model/extension/dashboard/map.php +++ b/upload/admin/model/extension/dashboard/map.php @@ -13,7 +13,7 @@ public function getTotalOrdersByCountry(): array { } if ($implode) { - $query = $this->db->query("SELECT COUNT(*) AS `total`, SUM(`o`.`total`) AS `amount`, LCASE(`c`.`iso_code_2`) AS `iso_code_2` FROM `" . DB_PREFIX . "order` `o` RIGHT JOIN `" . DB_PREFIX . "country` `c` ON (`o`.`payment_country_id` = `c`.`country_id`) WHERE (" . implode(" OR ", $implode) . ") GROUP BY `o`.`payment_country_id`"); + $query = $this->db->query("SELECT COUNT(*) AS `total`, SUM(`o`.`total`) AS `amount`, `c`.`iso_code_2` FROM `" . DB_PREFIX . "order` `o` LEFT OUTER JOIN `" . DB_PREFIX . "country` `c` ON (`o`.`payment_country_id` = `c`.`country_id`) WHERE `o`.`order_status_id` IN(" . implode(',', $implode) . ") GROUP BY `o`.`payment_country_id`"); return $query->rows; } else {