Post by james-asone » Fri Nov 27, 2015 7:12 pm

I tried most fixes on this thread before doing the most simple option of going to Admin > Settings > Option > Checkout and ensuring the API User was enabled instead of -- None --

This immediately rectified the problem for me on Opencart 2.0.1.1, good luck!

Newbie

Posts

Joined
Fri Nov 27, 2015 7:09 pm

Post by gogoweb » Mon Jan 18, 2016 3:44 am

Hi guys,
I had banged my head for few days with this issue and finally solved it somehow.
A little background.
I had 2-3 installations of OpenCart 2.0.3.1 on my server and the production one got this error when editing an order. Out of sudden (probably we changed something) and it did not crack applying most of the fixes mentioned in this thread.
- API checked
- DNS checked
- Cookie was send with the post request - checked
- Language - checked
- UTF8 encoding - checked
etc.

I had a deadline which had to be met and had no other choice but to find a quick solution.

Here is step by step how i managed to fix it:
  • - Downloaded a fresh copy of the 2.0.3.1 package from opencart.com (i suspected incorrect file encodings or bad bytes in current copy)
  • - Created a new DB / user (all rights)
  • - Installed OpenCart manually entering the just created DB credentials
  • - Logged into admin / created a new customer / went to front end / Logged into front end with the new customer/ made an order / returned back to admin/sales/orders / clicked edit on the new order
  • - Verified that I do not get any error (opened firebug and actually saw the ajax http response - success: You changed currency)
  • - Copied all files except for index.php and config.php (in admin as well) from the old (production) install over the fresh install
  • - I use lots of vQmod so went to /vqmod/install to make it work again
  • - Installed the lanaguage packs in admin
  • - Installed the ocmods modules in admin from extension installer - these you need to have prepared
  • - (x2) returned back to admin/sales/orders verified that I do not get any error (opened firebug and actually saw the ajax http response - success: You changed currency) - so its not any of the mods causing the trouble
  • - Because I was using a multilingual store - I went to NEW DB phpMyadmin and checked the language_id column of my existing languages in my case German = 2 . Then went to OLD DB and checked the language_id column of my existing products in my case German = 3. This is important for the next steps.
  • - Went to OLD DB - phpMyAdmin and exported the following tables. Important note here is to delete these table in the new DB before importing or to uncheck the advanced export option - IF NOT EXISTS.

    Code: Select all

    oc_address
    oc_affiliate
    oc_affiliate_activity
    oc_affiliate_login
    oc_affiliate_transaction
    oc_attribute
    oc_attribute_description
    oc_attribute_group
    oc_attribute_group_description
    oc_banner
    oc_banner_image
    oc_banner_image_description
    oc_blog
    oc_blog_category
    oc_blog_category_description
    oc_blog_category_to_layout
    oc_blog_category_to_store
    oc_blog_comment
    oc_blog_description
    oc_blog_related
    oc_blog_to_category
    oc_blog_to_layout
    oc_blog_to_store
    oc_category
    oc_category_description
    oc_category_filter
    oc_category_path
    oc_category_to_layout
    oc_category_to_store
    oc_country
    oc_coupon
    oc_coupon_category
    oc_coupon_history
    oc_coupon_product
    oc_currency
    oc_custom_field
    oc_custom_field_customer_group
    oc_custom_field_description
    oc_custom_field_value
    oc_custom_field_value_description
    oc_download
    oc_download_description
    oc_geo_zone
    oc_information
    oc_information_description
    oc_information_to_layout
    oc_information_to_store
    oc_location
    oc_manufacturer
    oc_manufacturer_to_store
    oc_marketing
    oc_option
    oc_option_description
    oc_option_value
    oc_option_value_description
    oc_product
    oc_product_attribute
    oc_product_description
    oc_product_discount
    oc_product_filter
    oc_product_image
    oc_product_option
    oc_product_option_value
    oc_product_recurring
    oc_product_related
    oc_product_reward
    oc_product_special
    oc_product_to_category
    oc_product_to_download
    oc_product_to_layout
    oc_product_to_store
    oc_recurring
    oc_recurring_description
    oc_return
    oc_return_action
    oc_return_history
    oc_return_reason
    oc_return_status
    oc_review
    oc_stock_status
    oc_tax_class
    oc_tax_rate
    oc_tax_rate_to_customer_group
    oc_tax_rule
    oc_upload
    oc_url_alias
    oc_weight_class
    oc_weight_class_description
    oc_zone
    oc_zone_to_geo_zone
  • - Went to NEW DB and imported the generated SQL script. This way you will preserve 100% of your categories / products / information page / attributes / options (well i skipped the filters but I don't use them anyway you can include them as well)
  • - Went to NEW DB every table and checked for column language_id when I saw it said 2 i ran a DELETE query to remove any sample data with that language. After that I repeated the process by using an UPDATE query to change 3 to 2.
  • - Fine tuned MANUALLY the store settings / logo / modules settings / shipping / payment / checkout
  • - (x3) returned back to admin/sales/orders verified that I do not get any error (opened firebug and actually saw the ajax http response - success: You changed currency) - so its not any of the mods causing the trouble
Note: in your case the ids will be different so be careful to not destroy any valid info by using the DELETE query, since i gave an example with german only but for the rest of languages one has to match them as well.
This is it!

All mods | OpenCart Bulk Related Products Ultimate Edition |GeoIP hide Prices / no add to cart by country| CSS override | Direct link to checkout / skip add to cart / buy now link | AUTO pilot - reward & purchase points


New member

Posts

Joined
Sat Oct 18, 2014 6:45 pm


Post by Randem » Fri Jan 29, 2016 7:25 pm


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by OSWorX » Fri Jan 29, 2016 8:20 pm

Randem wrote:Order Add/Edit issue resolved - http://www.randemsystems.com/support/op ... 8/#msg6218
At your list you forgot one (happend a few times at customers who edited language files by themselve and saved with BOM or/and as ANSII instead of UTF-8):

check also edited language files if they are not

1. saved with BOM or/and as ANSII instead UTF-8
2. have some other bugs in it (e.g. fogotten ; )

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Randem » Sat Jan 30, 2016 4:39 am

Hi OSWorX,

Thanks for the information. Yes, I forget that some attempt to edit their source files themselves... This can cause all sorts of issues. I have added this note to my list of possible misdeeds.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by X-Bumble » Thu Mar 10, 2016 7:17 pm

I have had this problem over the last week. When clicking 'add history' on the orders I got the dreaded 'SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data'.

After a whole host of checks and issues, it seems that Paypa'ls recent change to it's secure config cauases an issue with CURL.

I haven't yet found out a long term solution to that problem - but at least the JSON error has been resolved.

MY advice if you get this now is to speak to your hosting company.

New member

Posts

Joined
Thu Feb 12, 2015 7:53 pm

Post by webdesignby » Fri Mar 11, 2016 12:01 am

For me I simply had to add an SSL URL to my store. Testing locally with multiple store set up.

Newbie

Posts

Joined
Thu Mar 10, 2016 11:58 pm

Post by mantovaniarts » Fri Jun 03, 2016 3:27 am


Newbie

Posts

Joined
Fri Jun 03, 2016 3:25 am

Post by pwiking » Thu Jan 11, 2018 5:21 am

I have created a fix for this order update page JSON error.
If you have JSON error you can replace it with my module. Read the readme file to set up.
Download at: www.advertigo.net/orderstatus.zip

Sincerely, Mike
Advertigo.net team

Newbie

Posts

Joined
Fri Apr 29, 2016 1:41 pm
Who is online

Users browsing this forum: No registered users and 6 guests