Skip to content

Commit

Permalink
Merge pull request #11672 from nexadomain/patch-2
Browse files Browse the repository at this point in the history
Update custom_field.php
  • Loading branch information
danielkerr committed Sep 21, 2022
2 parents 3dc2a55 + 45c2e3f commit 44d8ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload/catalog/model/account/custom_field.php
Expand Up @@ -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");
}
Expand Down

0 comments on commit 44d8ebe

Please sign in to comment.