It is an error in the sql statement.
change catalog\controller\search.php as shown. It is a one line change but I have shown more code to help you locate it. The original line is commented. Replace it with the line below.
change catalog\controller\search.php as shown. It is a one line change but I have shown more code to help you locate it. The original line is commented. Replace it with the line below.
Code: Select all
if (!$session->get('search.description')) {
$sql = "select * from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id) where pd.language_id = '?' and pd.name like '?' and p.date_available < now() and p.status = '1'";
$results = $database->getRows($database->splitQuery($database->parse($sql, $language->getId(), '%' . $session->get('search.search') . '%'), $session->get('search.page'), $config->get('config_max_rows')));
} else {
// $sql = "select * from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id) where pd.language_id = '?' and pd.name like '?' or pd.description like '?' and p.date_available < now() and p.status = '1'";
// ** replace the above line with the following line
$sql = "select * from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id) where pd.language_id = '?' and (pd.name like '?' or pd.description like '?') and p.date_available < now() and p.status = '1'";
$results = $database->getRows($database->splitQuery($database->parse($sql, $language->getId(), '%' . $session->get('search.search') . '%', '%' . $session->get('search.search') . '%'), $session->get('search.page'), $config->get('config_max_rows')));
}
Who is online
Users browsing this forum: No registered users and 2 guests