-2

I know the same problem was posted on StackOverflow before but some of them were for other versions and some just did not work. Problem: When I try to change the order of status on 2.0.1.1 version of opencart I get =>

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK

Does anyone know the REAL reason behind this issue on version 2.0.1.1 of opencart. Thank you and a happy new year! Error Log=>

2017-01-01 12:44:22 - PHP Notice:  Use of undefined constant HTTPS_CATALOG - assumed 'HTTPS_CATALOG' in /home/otagmusik.com/httpdocs/admin/controller/sale/order.php on line 1484
2017-01-01 12:44:22 - PHP Notice:  Use of undefined constant HTTPS_CATALOG - assumed 'HTTPS_CATALOG' in /home/otagmusik.com/httpdocs/admin/controller/sale/order.php on line 1495

Line 1484 is

if (substr(HTTPS_CATALOG, 0, 5) == 'https') {

Line 1495 is

curl_setopt($curl, CURLOPT_URL, HTTPS_CATALOG . 'index.php?route=api/login');
Otag
  • 141
  • 11
  • 2
    A fresh install of opencart doesn't have such a problem, have you changeed any file or install any module? also check your error log. – DigitCart Jan 01 '17 at 14:16
  • @Mojtaba Sabeti Hello I added error logs related to the issue... – Otag Jan 01 '17 at 21:13

1 Answers1

1

Change as follows=>

httpdocs/config

// HTTPS

    define('HTTPS_SERVER', 'http://www.yoursitename.com/');

httpdocs/admin/config

// HTTPS
define('HTTPS_SERVER', 'http://www.yoursitename.com/admin/');
define('HTTPS_CATALOG', 'http://www.yoursitename.com/');

After you make sure that the http(s) entries match in httpdocs/config and admin/config files try changing the order status. It must change otherwise you may have blocked the interval of the IP address that is used for this interaction. Now for a while remove all blocked IPs from your list in the .htaccess file (copy it somewhere else). Try again. It should do it. OC 2.0.1.1 runs with PHP 4+. The problem is the MATCH between the to config files in the aforementioned folders and/or the block in the .htaccess file.

Otag
  • 141
  • 11