tolower($word)) . "%' OR LCASE(pd.description) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%'"; } else { $implode[] = "LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%'"; } } if ($implode) { $sql .= " " . implode(" OR ", $implode) . ""; } } if (!empty($data['filter_name']) && !empty($data['filter_tag'])) { $sql .= " OR "; } if (!empty($data['filter_tag'])) { $implode = array(); $words = explode(' ', $data['filter_tag']); $words = array_filter(array_unique($words), 'strlen'); foreach ($words as $word) { $implode[] = "LCASE(pt.tag) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%' AND pt.language_id = '" . (int)$this->config->get('config_language_id') . "'"; } if ($implode) { $sql .= " " . implode(" OR ", $implode) . ""; } } $sql .= ")"; } if (!empty($data['filter_category_id'])) { if (!empty($data['filter_sub_category'])) { $implode_data = array(); $implode_data[] = "p2c.category_id = '" . (int)$data['filter_category_id'] . "'"; $this->load->model('catalog/category'); $categories = $this->model_catalog_category->getCategoriesByParentId($data['filter_category_id']); foreach ($categories as $category_id) { $implode_data[] = "p2c.category_id = '" . (int)$category_id . "'"; } $sql .= " AND (" . implode(' OR ', $implode_data) . ")"; } else { $sql .= " AND p2c.category_id = '" . (int)$data['filter_category_id'] . "'"; } } if (!empty($data['filter_manufacturer_id'])) { $sql .= " AND p.manufacturer_id = '" . (int)$data['filter_manufacturer_id'] . "'"; } $query = $this->db->query($sql); return $query->row['total']; } public function getTotalProductSpecials() { if ($this->customer->isLogged()) { $customer_group_id = $this->customer->getCustomerGroupId(); } else { $customer_group_id = $this->config->get('config_customer_group_id'); } $query = $this->db->query("SELECT COUNT(DISTINCT ps.product_id) AS total FROM " . DB_PREFIX . "product_special ps LEFT JOIN " . DB_PREFIX . "product p ON (ps.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND ps.customer_group_id = '" . (int)$customer_group_id . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW()))"); if (isset($query->row['total'])) { return $query->row['total']; } else { return 0; } } } ?>
Fatal error: Class 'Modelcatalogproduct' not found in /home/u234988/tradeburo.ru/www/vq2-system_engine_loader.php on line 37