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 {