Opencart admin page 301 Moved Permanently

Viewed 156

I have opencart Version 2.0.1.1 and recently i have noticed a strange error. when i visit the sale/order page it is showing a popup with the error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
 <title>301 Moved Permanently</title>
 </head><body>
 <h1>Moved Permanently</h1>
 <p>The document has moved <a href="https://webdomain.com/?route=api/voucher/add&amp;api=api%2Fvoucher%2Fadd">here</a>.</p>
 </body></html>

what is this error and how we can resolve this ? any idea? i am totally blank on it.

1 Answers

Try this in Admin panel:

  • Go to System > Users > API.
  • Add a new API, generate password, and enable it, add your IP address in IP tab.
  • Then go to Admin > System > Settings > Edit, tab Option.
  • Select API user under Checkout section as your API user.
  • Save the changes.
  • Go to Sales > Orders to check if error is gone.
Related