Dismiss Notice
Hey Guest, make sure to follow us on Twitter! Say hi and we'll be sure to follow back!

Opencart 2 can't edit orders, JSON error... '<'

Discussion in 'Opencart Support' started by myukb, Jan 5, 2017.

  1. myukb

    myukb UKBF Newcomer Free Member

    Posts: 4 Likes: 0
    Having issues editing/saving my opencart 2 orders. When I try it either gives me a JSON error:

    "SyntaxError: JSON Parse error: Unrecognized token '<'
    OK"

    Or it tells me on the last 5th page of editing orders: "Warning: No Payment options are available!" and even though I selected the payment it still thinks there is no payment method selected.

    ONLY WAY TO EDIT AND SAVE:
    Only if I go fast through the first 4 pages so go, CONTINUE, CONTINUE, CONTINUE, CONTINUE, than on 5th page I have to fast click refresh SHIPPING METHOD, fast refresh PAYMENT METHOD, and click SAVE, only this way I can be successful in saving.

    What could be causing this? Any advice is much much appreciated.

    I can't really figure out when this issue started but I know I've had it for the last year or so. Its really annoying having to go to my cpanel and database every time I want to edit an order.
     
    Posted: Jan 5, 2017 By: myukb Member since: Jan 5, 2017
    #1
  2. ryedale

    ryedale Contributor Full Member - Verified Business

    Posts: 1,409 Likes: 330
    Hi - what version are you on?
     
    Posted: Jan 6, 2017 By: ryedale Member since: Dec 17, 2013
    #2
  3. WebDesires

    WebDesires UKBF Regular Full Member

    Posts: 161 Likes: 18
    We are OpenCart specialists please drop us a line and we will have a look and give you a quote for the work.
     
    Posted: Jan 6, 2017 By: WebDesires Member since: Feb 23, 2016
    #3
  4. myukb

    myukb UKBF Newcomer Free Member

    Posts: 4 Likes: 0
    I am on 2.0.1.1.

    I've noticed it almost feels like edit order section is having issues talking to my server/database MAYBE??. No other part of my OC has issues talking to the database only editing the orders.

    When I click on edit order, first page as you know is customer info, page 2 is what products they purchase, a lot of times when I get to the page 2 with all the products purchased they simply disappear.

    Only way to get them to show up again is going back to main page of all the orders and clicking edit again, than going to page 1, than page 2 and cross your fingers that they show up.

    If they don't show up I can't go to page 3, 4, and 5 to finish editing the order. Have to start all over, sometimes 50 times before 1 successful order edit! So strange!


    PS I've also noticed sometimes I have maybe 50% change of success and at other times its like 5% change of successful edit, which is another reason its making me think it could be an issue talking to the server??? I have my IP address added in my cpanel to be able to talk to database as a precaution as well.




    .
     
    Posted: Jan 6, 2017 By: myukb Member since: Jan 5, 2017
    #4
  5. ryedale

    ryedale Contributor Full Member - Verified Business

    Posts: 1,409 Likes: 330
    Have you had a look in the OpenCart system logs or the main PHP error log to see if there's anything there

    How does the site perform generally on the hosting - is it stable and fast?
     
    Posted: Jan 6, 2017 By: ryedale Member since: Dec 17, 2013
    #5
  6. myukb

    myukb UKBF Newcomer Free Member

    Posts: 4 Likes: 0
    No errors related to this in either .com/admin side and root errorlog file.

    Yes site is fast, responsive, never crashes or gives users errors. Maybe once in a great while its feels like the first bite transfer is slow but thats because I'm on a cheap shared server I think. I can't say there are any other issues other than this

    .
     
    Posted: Jan 6, 2017 By: myukb Member since: Jan 5, 2017
    #6
  7. ryedale

    ryedale Contributor Full Member - Verified Business

    Posts: 1,409 Likes: 330
    Posted: Jan 6, 2017 By: ryedale Member since: Dec 17, 2013
    #7
  8. WebDesires

    WebDesires UKBF Regular Full Member

    Posts: 161 Likes: 18
    If it is an API issue no need to upgrade, we have a working fix that we can implement, but this needs investigating before the true cause can be identified.
     
    Posted: Jan 6, 2017 By: WebDesires Member since: Feb 23, 2016
    #8
  9. myukb

    myukb UKBF Newcomer Free Member

    Posts: 4 Likes: 0
    Yes I have a lot of stuff on it, I tried upgrading while back to see what extension and vqmods would work and which would not and most didn't so upgrade is a no go.

    Thanks for the link, I've tested most code JSON fixes others have suggested
    and I've tried adding a new API user fix with no luck.

    Someone mentioned it could be something to do with curl? I don't know what that is or what they mean but I'll do more research.

    WebDesires how would I know if its a API issue?

    What I really dont understand is why can I edit products and other stuff that talks to the database but I can't edit orders which are also in the database. Whats the difference?


    .
     
    Posted: Jan 6, 2017 By: myukb Member since: Jan 5, 2017
    #9