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

Undefined index: api_token in


Recommended Posts

Здравствуйте

 

Усиновил ocStore 3.0.2.0 на хостинг, хотел выгрузить номенклатуру из 1С

Отправил POST запрос https://.../index.php?&route=api/login с user_name и key

 

Но система выдает ошибку 

 

<b>Notice</b>: Undefined index: api_token in
<b>/home/m/test/public_html/catalog/controller/startup/session.php</b> on line <b>8</b>

 

В указанном файле пропотому чтовал менять ['api_token'] на ['user_token'], ['token'] но безрезульитно, ошибка и же, только имя другое

 

Что посоветуете?

Link to comment
Share on other sites


  • 1 month later...
  • 11 months later...

https://forum.opencart.com/viewtopic.php?f=198&t=202726&p=716825&hilit=api_token#p716825

 

catalog\controller\startup\session.php

Найти :

if (isset($this->request->get['route']) && substr($this->request->get['route'], 0, 4) == 'api/') {

Заменить на:

if (isset($this->request->get['route']) && substr($this->request->get['route'], 0, 4) == 'api/' && !empty($this->request->get['api_token']) && isset($this->request->server['REMOTE_ADDR'])) {

 

  • +1 1
Link to comment
Share on other sites

  • 1 year later...
В 02.09.2020 в 23:05, Tom сказал:

https://forum.opencart.com/viewtopic.php?f=198&t=202726&p=716825&hilit=api_token#p716825

 

catalog\controller\startup\session.php

Найти :

if (isset($this->request->get['route']) && substr($this->request->get['route'], 0, 4) == 'api/') {

Заменить на:

if (isset($this->request->get['route']) && substr($this->request->get['route'], 0, 4) == 'api/' && !empty($this->request->get['api_token']) && isset($this->request->server['REMOTE_ADDR'])) {

 

Большое спасипотому что за совет, в OrderManager PRO при  быстрой смене ситуса была и же ошибка, исправление помогло! 

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.