1-pinpon
2-pınpon
I search pinpon , result 1

I search pınpon , result 1

must result all

2.1.0.2 journal
Code: Select all
$implode[] = "pd.name LIKE '%" . $this->db->escape($word) . "%'";
Code: Select all
$implode[] = "pd.name LIKE TRIM(LCASE('%" . $this->db->escape($word) . "%'))";
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
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.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
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);
}
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'])) . "%'";
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
This extension may be useful: https://www.opencart.com/index.php?rout ... n_id=12145
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
thank you but, 1.steps after website not workingstraightlight 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'])) . "%'";
Code: Select all
ALTER TABLE oc_product_description CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
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.
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.
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";
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
thank you but, 1.steps after website not workingstraightlight 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";
Users browsing this forum: No registered users and 13 guests