1-pinpon
2-pınpon
I search pinpon , result 1
I search pınpon , result 1
must result all
2.1.0.2 journal
replace:
Code: Select all
$implode[] = "pd.name LIKE '%" . $this->db->escape($word) . "%'";
Code: Select all
$implode[] = "pd.name LIKE TRIM(LCASE('%" . $this->db->escape($word) . "%'))";
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Be reminded that both %, one at the beginning and one at the end, are being used on this query which means that anything from the beginning and the end can be matched. Which is why, trim is implicit with this string search.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Possibly, your database can be configured to treat "i" and "dotless i" the same in searches, but I don't know how to do it. It would probably be something in the selected "collation".
find:
Code: Select all
return $string;
}
Code: Select all
return $string;
}
function removeAccents($value, $language) {
$code = explode('-', trim($language));
setlocale(LC_ALL, strtolower($code[0]) . "_" . strtoupper($code[1]) . ".utf8");
return iconv('UTF-8', 'ASCII//TRANSLIT',$value);
}
find all instances of:
Code: Select all
$implode[] = "pd.name LIKE '%" . $this->db->escape($word) . "%'";
Code: Select all
$implode[] = "pd.name LIKE '%" . $this->db->escape(replaceAccents($word, $this->session->data['language'])) . "%'";
Code: Select all
$sql .= " OR pd.description LIKE '%" . $this->db->escape($data['filter_name']) . "%'";
Code: Select all
$sql .= " OR pd.description LIKE '%" . $this->db->escape(replaceAccents($data['filter_name'], $this->session->data['language'])) . "%'";
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
This extension may be useful: https://www.opencart.com/index.php?rout ... n_id=12145
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
search : pınar aylin found.
search : pinar aylin not found :/
serch : hakkı found
search : hakki not found
can you help me ?
2.0.1.2
jorunal
thank you but, 1.steps after website not working (straightlight wrote: ↑Thu Nov 30, 2017 4:30 amLet's troubleshoot this issue regarding accentuated characters. In system/helper/utf8.php file, at the bottom of fhe file,
find:
replace with:Code: Select all
return $string; }
Then, in your catalog/model/catalog/product.php file,Code: Select all
return $string; } function removeAccents($value, $language) { $code = explode('-', trim($language)); setlocale(LC_ALL, strtolower($code[0]) . "_" . strtoupper($code[1]) . ".utf8"); return iconv('UTF-8', 'ASCII//TRANSLIT',$value); }
find all instances of:
replace all with:Code: Select all
$implode[] = "pd.name LIKE '%" . $this->db->escape($word) . "%'";
Then, find all instances of:Code: Select all
$implode[] = "pd.name LIKE '%" . $this->db->escape(replaceAccents($word, $this->session->data['language'])) . "%'";
replace all with:Code: Select all
$sql .= " OR pd.description LIKE '%" . $this->db->escape($data['filter_name']) . "%'";
See if that solves the issue.Code: Select all
$sql .= " OR pd.description LIKE '%" . $this->db->escape(replaceAccents($data['filter_name'], $this->session->data['language'])) . "%'";
and very very hard.
another fix ?
ı use ısearchcortable but same problem (
ı try 2 years
2.0.1.2
Code: Select all
ALTER TABLE oc_product_description CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Make sure you replace "oc_" with your database prefix.
hi again,Johnathan wrote: ↑Tue Aug 14, 2018 9:44 pmThis is probably a database encoding issue, not an OpenCart code issue. Make sure your database is set to have a collation of "utf8_unicode_ci", so that it works with non-English characters, and can see them as the equivalent English character when entered. If it's not, here's the database query you'd run to change that collation:
Code: Select all
ALTER TABLE oc_product_description CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Make sure you replace "oc_" with your database prefix.
ı use utf8 general_ci
I tried convert your code but now he does not find anything. (
thank you but I think the problem is in OpenCart itself.because i looked with isenslab isearchcortable extentions and ı tryed ı = i and worked.but this does not work for me.because this time i can not find the letters "i" :/Johnathan wrote: ↑Thu Aug 16, 2018 5:22 amIf utf8_unicode_ci doesn't work, then switch back to utf8_general_ci. However, the database encoding is still likely the issue, so you should look into that, or hire someone with more experience to look into it for you. You may have other database encoding issues going on, which could be causing conflicts.
Replace:
Code: Select all
$implode[] = "pd.name LIKE TRIM(LCASE('%" . $this->db->escape($word) . "%'))";
Code: Select all
$implode[] = "pd.name LIKE TRIM(LCASE('%" . $this->db->escape($word) . "%')) COLLATE utf8_general_ci";
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
thank you but, 1.steps after website not working ( first for you message..straightlight wrote: ↑Thu Aug 16, 2018 6:21 amUpdated instructions from my previous post.
Replace:
with:Code: Select all
$implode[] = "pd.name LIKE TRIM(LCASE('%" . $this->db->escape($word) . "%'))";
to search LONGBLOB field types. Looks for case sensitive but not accent sensitive: https://stackoverflow.com/questions/500 ... h-in-mysqlCode: Select all
$implode[] = "pd.name LIKE TRIM(LCASE('%" . $this->db->escape($word) . "%')) COLLATE utf8_general_ci";
and after ı tryed only here your message but problem not resolve
catalog/model/catalog/product file : https://we.tl/Kz2PNHcCMq
catalog/model/catalog/isearch file : https://we.tl/Kz2PNHcCMq
I need :
i = ı and ı = i
and
lower case sameone in search.
please (
Users browsing this forum: No registered users and 56 guests