Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Поиск на русском в OpenCart 1.5.1


 Share

Recommended Posts

Уважаемые господа!

Очень интересная новая версия OC 1.5.

Есть проблемы: не ищется товар на русском.

Что пробовал сделать:

1. Пробовал сравнение в БД ставить cp1251_general_ci, а в php.ini корневой магазина менять default_charset = cp1251;

Результат отрицательный

2. В \catalog\model\catalog\product.php

замена $this->db->escape на mysql_real_escape_string и убирание strtolower в запросах частично решает проблему, но если в поиске ввести с большой буквы, соответственно, не будет корректно искать...

Как корректно сделать поиск товаров на русском, без полумер (п.2 или убивания LCASE)?

Буду признателен за разъяснения.

Link to comment
Share on other sites


В первую очередь нужно в БД ставить кодировку utf-8, а не cp1251.

В файле, который вы указали надо убрать LCASE, а strtolower заменить на mb_strtolower.

Если хочется понимания для чего и почему это надо делать - читайте мануалы.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.