Post by scrapingspace » Fri Jul 10, 2020 3:17 pm

I have opencart Version 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

Code: Select all

 <title>301 Moved Permanently</title>
 <h1>Moved Permanently</h1>
 <p>The document has moved <a href=";api=api%2Fvoucher%2Fadd">here</a>.</p>



Fri Jul 10, 2020 3:11 pm

Post by johnp » Fri Jul 10, 2020 10:08 pm

What version of PHP are you using? I would be inclined to clone your site and upgrade the clone to and see if the error still persists.

Also. Try this answer from Stackoverflow:

"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."

Opencart Bootstrap Pro/VQMOD 2.6.1 lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at

User avatar
Active Member


Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by scrapingspace » Wed Jul 15, 2020 8:24 pm

PHP Version 5.5.38 i have already checked the API is already assigned there



Fri Jul 10, 2020 3:11 pm

Post by netruxa » Thu Jul 16, 2020 3:56 am

may be problem with http - https redirect?
are store and admin use https both?

User avatar
New member


Fri Dec 16, 2016 1:34 pm

Who is online

Users browsing this forum: No registered users and 4 guests