Post by ransom1 » Thu Jan 02, 2020 5:45 pm

Hello,
I am trying to login to use the API on my store, and when I try I get this error:

Notice: Undefined index: api_token in /catalog/controller/startup/session.php on line 8

I'm following the documentation here:
http://docs.opencart.com/en-gb/system/users/api/

Passing the username and key but I get this error. Does anyone know how to fix it?

Thanks!!

Newbie

Posts

Joined
Mon Jul 14, 2014 6:20 pm

Post by straightlight » Thu Jan 02, 2020 9:14 pm


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ransom1 » Fri Jan 03, 2020 5:52 am

Thank you for your response.

That fix didn't work for me, unfortunately.

My admin/view/template/sale/order_info.twig doesn't have the code that the post says to change.

I made the specified changes in admin/view/template/sale/order_info.twig but I am still getting the same error message:

Notice: Undefined index: api_token in/catalog/controller/startup/session.php on line 8

Newbie

Posts

Joined
Mon Jul 14, 2014 6:20 pm

Post by paulfeakins » Fri Jan 03, 2020 6:35 pm

ransom1 wrote:
Thu Jan 02, 2020 5:45 pm
I am trying to login to use the API on my store
What exactly are you trying to do? Just edit products?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by ransom1 » Fri Jan 03, 2020 6:37 pm

I'd like to add products to the cart.
But at this stage I can't manage to login to the api and get my api token.

Newbie

Posts

Joined
Mon Jul 14, 2014 6:20 pm

Post by straightlight » Sat Jan 04, 2020 9:48 pm


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sat Jan 04, 2020 9:55 pm

If the solution above doesn't solved the issue, try this one: viewtopic.php?f=190&t=165840&p=631012#p630942

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Google [Bot] and 85 guests