Skip to content

Commit

Permalink
Fixed extension/dashboard/map total orders by country model
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Aug 23, 2024
1 parent 7e484ee commit a7f9b9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload/admin/model/extension/dashboard/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a7f9b9f

Please sign in to comment.