Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

404 ошибка при открытии seo_url при другом активном языке


Recommended Posts

Доброго!

Обнаружилась ошибка, что при открытии URL  https://freerider.com.ua/rul-lucky-pro-wide-black-ru/ вылазит 404.

Если изменить язык с ******ского на русский, то открывается нормально.

Потом переключение проходит нормально. URL меняется на соответствующий языку.

Если в соседней вкладке выбрать русский язык, а потом открыть https://freerider.com.ua/kermo-lucky-pro-wide-black-ua/ , то возникает тоже 404.

ocStore 3.0.2.0 + шаблон Ultrastore.

Подскажите пожалуйси куда копать?

Link to comment
Share on other sites


seo_url:

seo_url_id  store_id  language_id  query             keyword                        
----------  --------  -----------  ----------------  -------------------------------
     42791         0            6  product_id=36648  kermo-lucky-pro-wide-black-ua  
     42792         0            1  product_id=36648  rul-lucky-pro-wide-black-ru    

language:

language_id  name                  code    locale                       image   directory  sort_order  status  
-----------  --------------------  ------  ---------------------------  ------  ---------  ----------  --------
          1  Русский               ru-ru   ru_RU.UTF-8,ru_RU,russian                                1         1
          6  Украинская            uk-ua   uk_RU.UTF-8,uk_RU,ukrainian                              0         1

Открывается нормально по опотому чтоим url. 

Проблема, когда активный один язык, а не открывается url со второго языка.

Пока нашёл, что тема вяжется в seo_pro : getQueryByKeyword($keyword, $language_id = null)

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

 

$_query = $this->db->query("SELECT query FROM " . DB_PREFIX . "seo_url WHERE keyword = '" . $this->db->escape($keyword) . "' AND store_id = '" . $store_id . "' AND language_id = '" . $language_id . "' LIMIT 1");    

заменить на:

$_query = $this->db->query("SELECT query FROM " . DB_PREFIX . "seo_url WHERE keyword = '" . $this->db->escape($keyword) . "' AND store_id = '" . $store_id . "' LIMIT 1");    

причём сразу и язык меняется.

К чему бы это?

Edited by AndriiSemikov
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.