
OpenCart 2 error: SyntaxError Unexpected End of Input OK
We have noticed that some clients are experiencing an error when they try to edit orders on their websites. This looked quite strange, as there are no indications in the error logs for the cause.
After further investigation, we have discovered that the issue is causing troubles for a lot of OpenCart users. There are open issues on GitHub OpenCart Issue and StackOverflow OpenCart Issue that describe the error in details. Still, if you are experiencing such an error message as well, there is a way to fix that completely. Here is what you can try, in order to resolve the error message.

Disable Maintenance Mode
The first thing you need to consider is to disable maintenance mode on your website if you are using this feature. It may be causing the error message in question on your website so you can test that first. Simply log into the admin area of your website and locate the System option from the left-side menu. Then click on the Settings button.

Choose your store and click on the Edit button next to it.

Select the Server tab and scroll down to the Maintenance Mode option. Set it to No and Save the changes.

Remove Password Protection
If you have password-protection for your OpenCart installation, this may be causing the error message in question as well. It is important to remove the password protection on your website and test editing of the orders again.
Generate User API
If the above techniques do not work, there is a third cause for the error as well. Log into your OpenCart administrative area and locate the System option on the left-side menu. Select Users and then API.

Click on the Add New button to create a new API on your website. Edit the following two fields:
Username: Enter a long username with letters and numbers. It doesn’t have to make sense, but to be secured.
Password: Generate a password
Status: Set the status to Enabled.
When you are ready, click on the Save button to keep the changes.

After that, select the System tab from the main menu again and click on the Settings option. Select your store and click on the Edit button next to it. On the next page, select the Options tab and scroll down to the Checkout section. Select the user you have created above from the API User drop-down box.

The issue with the error message when editing orders on your OpenCart 2 website should now be fully resolved. Still, note that FastComet offers free 24/7 technical support assistance on each SSD OpenCart Hosting plans. If you are not able to fix the error yourself, you can always request assistance from our team via your FastComet Client Area.
The latest tips and news from the industry straight to your inbox!
Join 30,000+ subscribers for exclusive access to our monthly newsletter with insider cloud, hosting and WordPress tips!