From 45c2e3fc9fc8872344e85111945e46ad741cb0d2 Mon Sep 17 00:00:00 2001 From: nexadomain <77724079+nexadomain@users.noreply.github.com> Date: Wed, 21 Sep 2022 15:49:04 +0530 Subject: [PATCH] Update custom_field.php cf.`status` = '1' was wrote 2 times in SQL Statement Extra one has been removed --- upload/catalog/model/account/custom_field.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/catalog/model/account/custom_field.php b/upload/catalog/model/account/custom_field.php index c6d21f5feeb..fdda83ca41f 100644 --- a/upload/catalog/model/account/custom_field.php +++ b/upload/catalog/model/account/custom_field.php @@ -11,7 +11,7 @@ public function getCustomFields(int $customer_group_id = 0): array { $custom_field_data = []; if (!$customer_group_id) { - $custom_field_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "custom_field` cf LEFT JOIN `" . DB_PREFIX . "custom_field_description` cfd ON (cf.`custom_field_id` = cfd.`custom_field_id`) WHERE cf.`status` = '1' AND cfd.`language_id` = '" . (int)$this->config->get('config_language_id') . "' AND cf.`status` = '1' ORDER BY cf.`sort_order` ASC"); + $custom_field_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "custom_field` cf LEFT JOIN `" . DB_PREFIX . "custom_field_description` cfd ON (cf.`custom_field_id` = cfd.`custom_field_id`) WHERE cf.`status` = '1' AND cfd.`language_id` = '" . (int)$this->config->get('config_language_id') . "' ORDER BY cf.`sort_order` ASC"); } else { $custom_field_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "custom_field_customer_group` cfcg LEFT JOIN `" . DB_PREFIX . "custom_field` cf ON (cfcg.`custom_field_id` = cf.`custom_field_id`) LEFT JOIN `" . DB_PREFIX . "custom_field_description` cfd ON (cf.`custom_field_id` = cfd.`custom_field_id`) WHERE cf.`status` = '1' AND cfd.`language_id` = '" . (int)$this->config->get('config_language_id') . "' AND cfcg.`customer_group_id` = '" . (int)$customer_group_id . "' ORDER BY cf.`sort_order` ASC"); }