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

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

Code: Select all

<!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>

Newbie

Posts

Joined
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 2.3.0.2 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 1.5.6.5/OC 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 https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
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

Newbie

Posts

Joined
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

Posts

Joined
Fri Dec 16, 2016 1:34 pm

Who is online

Users browsing this forum: No registered users and 5 guests