Hello All,
this is my first post so be gentle.
I've just installed Opencart, everything seems fine (although I've still only just set it up) apart from the search function..
if i search for any keyword i get this error:
Fatal error: Call to undefined function mb_strtolower() in /home/spdweb/public_html/fever_store/catalog/model/catalog/product.php on line 397
but if i search hit search with nothing in the field it will take me to the search result page.
can anyone help?
Thank you.
Sonny
this is my first post so be gentle.
I've just installed Opencart, everything seems fine (although I've still only just set it up) apart from the search function..
if i search for any keyword i get this error:
Fatal error: Call to undefined function mb_strtolower() in /home/spdweb/public_html/fever_store/catalog/model/catalog/product.php on line 397
but if i search hit search with nothing in the field it will take me to the search result page.
can anyone help?
Thank you.
Sonny
[If you get this error:]
Fatal error: Call to undefined function: mb_strtolower() in
?.php on line ??
The PHP mbstring extension, which is required to handle international character sets, is not available on your server. Check your PHP configuration and make sure that PHP has been compiled with --enable-mbstring.
Fatal error: Call to undefined function: mb_strtolower() in

The PHP mbstring extension, which is required to handle international character sets, is not available on your server. Check your PHP configuration and make sure that PHP has been compiled with --enable-mbstring.
In short. contact your webhost and ask them if mbstring is enabled.uksitebuilder wrote:[If you get this error:]
Fatal error: Call to undefined function: mb_strtolower() in?.php on line ??
The PHP mbstring extension, which is required to handle international character sets, is not available on your server. Check your PHP configuration and make sure that PHP has been compiled with --enable-mbstring.
Maybe you should use the SVN version number where this is fixt, I just download the SVN-486 and have no search error.Daniel wrote:fixed in svn. also re-uploading 1.5.1 with the fixes in.
I see that the SVN is now 487 but I do not know if this is the version where the search is fixt.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
OpenCart®
Project Owner & Developer.
I'm still finding search is not working in the latest released 1.5.1 (and SVN r487)
Code: Select all
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY p.product_id ORDER BY p.sort_order ASC LIMIT 0,15' at line 1
Error No: 1064
SELECT p.product_id, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (LCASE(pd.name) LIKE LCASE('%your-search-here%') OR p.product_id IN (SELECT pt.product_id FROM product_tag pt WHERE pt.language_id = '1' AND LCASE(pt.tag) LIKE LCASE('%your-search-here%')) GROUP BY p.product_id ORDER BY p.sort_order ASC LIMIT 0,15
Seems a few errors crept in when changing from mb function to LCASE (was it really a good idea to REPLACE the working version with one from SVN without any change to version numbering - there must be several different 1.5.1 'releases' out there by now.
The following diff applied to model/catalog/product.php will correct the search, I have not tested any of the other files that were changed (yet) in the most recent SVN.
The following diff applied to model/catalog/product.php will correct the search, I have not tested any of the other files that were changed (yet) in the most recent SVN.
Code: Select all
74c74
< $sql .= " AND (LCASE(pd.name) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR p.product_id IN (SELECT pt.product_id FROM " . DB_PREFIX . "product_tag pt WHERE pt.language_id = '" . (int)$this->config->get('config_language_id') . "' AND LCASE(pt.tag) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR LCASE(pd.description) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%'))";
---
> $sql .= " AND (LCASE(pd.name) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR p.product_id IN (SELECT pt.product_id FROM " . DB_PREFIX . "product_tag pt WHERE pt.language_id = '" . (int)$this->config->get('config_language_id') . "' AND LCASE(pt.tag) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR LCASE(pd.description) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%')))";
76c76
< $sql .= " AND (LCASE(pd.name) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR p.product_id IN (SELECT pt.product_id FROM " . DB_PREFIX . "product_tag pt WHERE pt.language_id = '" . (int)$this->config->get('config_language_id') . "' AND LCASE(pt.tag) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%'))";
---
> $sql .= " AND (LCASE(pd.name) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR p.product_id IN (SELECT pt.product_id FROM " . DB_PREFIX . "product_tag pt WHERE pt.language_id = '" . (int)$this->config->get('config_language_id') . "' AND LCASE(pt.tag) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%')))";
395c395
< $sql .= " AND (LCASE(pd.name) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR p.product_id IN (SELECT pt.product_id FROM " . DB_PREFIX . "product_tag pt WHERE pt.language_id = '" . (int)$this->config->get('config_language_id') . "' AND LCASE(pt.tag) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%')) OR LCASE(pd.description) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%'))";
---
> $sql .= " AND (LCASE(pd.name) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%') OR p.product_id IN (SELECT pt.product_id FROM " . DB_PREFIX . "product_tag pt WHERE pt.language_id = '" . (int)$this->config->get('config_language_id') . "' AND LCASE(pt.tag) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%')) OR (LCASE(pd.description) LIKE LCASE('%" . $this->db->escape($data['filter_name']) . "%')))";
just fixed it on svn:
http://code.google.com/p/opencart/source/detail?r=489
i have also re-released 1.5.1 as this is a pretty bad bug.
http://code.google.com/p/opencart/source/detail?r=489
i have also re-released 1.5.1 as this is a pretty bad bug.
OpenCart®
Project Owner & Developer.
Who is online
Users browsing this forum: No registered users and 3 guests