for each step - invoice, delivery formSyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: comment in ...
Reason: Added quote tags.
http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme
Extra Positions PRO, Custom JavaScript, Custom CSS and others
- Which OC version are you using?
- Does this error occur by using the API from the admin orders or from the customer's checkout page?
What I am noticing is this error from your first post:
"Comment in ..." (...) where exactly? A location should be provided from the error window.SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: comment in ...
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
the errors appear when trying to place an order as a client
errors:
then if i complete fax i get:SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: fax in <b>/home/imecamc/public_html/catalog/controller/checkout/guest.php</b> on line <b>273</b>[]
and the errors appear if i do not complete each and every field in the order - even the order comment form....SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: comment in <b>/home/imecamc/public_html/catalog/controller/checkout/shipping_method.php</b> on line <b>127</b>[]
Reason: Added quote tags.
In catalog/controller/checkout/guest.php file,
find:
Code: Select all
$this->session->data['guest']['fax'] = $this->request->post['fax'];
Code: Select all
$this->session->data['guest']['fax'] = '';
if (!empty($this->request->post['fax'])) {
$this->session->data['guest']['fax'] = $this->request->post['fax'];
}
find:
Code: Select all
$this->session->data['comment'] = strip_tags($this->request->post['comment']);
Code: Select all
$this->session->data['comment'] = '';
if (!empty($this->request->post['comment'])) {
$this->session->data['comment'] = strip_tags($this->request->post['comment']);
}
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
i tried this and i get a lot of messages...
and it seems that it is the same if i order without guest mode..
Attachments
tried.jpg (167.72 KiB) Viewed 20463 times
Attachments
error.jpg (34.75 KiB) Viewed 20452 times
find:
Code: Select all
$this->session->data['payment_address']['company'] = $this->request->post['company'];
Code: Select all
$this->session->data['payment_address']['company'] = '';
if (!empty($this->request->post['company'])) {
$this->session->data['payment_address']['company'] = $this->request->post['company'];
}
Code: Select all
$this->session->data['payment_address']['address_2'] = $this->request->post['address_2'];
Code: Select all
$this->session->data['payment_address']['address_2'] = '';
if (!empty($this->request->post['address_2'])) {
$this->session->data['payment_address']['address_2'] = $this->request->post['address_2'];
}
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
i allready followed your example and it works fine
however i am stuck with the payment and shipping method...
the same error is thrown for guest and account mode...
find:
Code: Select all
$this->session->data['comment'] = strip_tags($this->request->post['comment']);
Code: Select all
$this->session->data['comment'] = '';
if (!empty($this->request->post['comment'])) {
$this->session->data['comment'] = $this->request->post['comment'];
}
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
I have this same issue, and thanks to the above posts, I was able to fix all but one JSON error
I've updated onto a copy of my store and the upgrade script worked like a charm from 2.0.3.1 to 2.2.0.0
I had this same error for guest.php and shipping_method.php but was able to find the fix on the forum.
I haven't been able to find a fix for this one though:
Any help greatly appreciatedSyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: comment in <b>/.../catalog/controller/checkout/payment_method.php</b> on line <b>186</b>[]
Reason: Added quote tags.
The solution is right above your post for this file particularly ...platypuspuzzles wrote:Hi
I have this same issue, and thanks to the above posts, I was able to fix all but one JSON error
I've updated onto a copy of my store and the upgrade script worked like a charm from 2.0.3.1 to 2.2.0.0
I had this same error for guest.php and shipping_method.php but was able to find the fix on the forum.
I haven't been able to find a fix for this one though:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: comment in <b>/.../catalog/controller/checkout/payment_method.php</b> on line <b>186</b>[]
Any help greatly appreciated
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
I tried to find and replace the text in payment_method too, but it didnt workstraightlight wrote:The solution is right above your post for this file particularly ...platypuspuzzles wrote:Hi
I have this same issue, and thanks to the above posts, I was able to fix all but one JSON error
I've updated onto a copy of my store and the upgrade script worked like a charm from 2.0.3.1 to 2.2.0.0
I had this same error for guest.php and shipping_method.php but was able to find the fix on the forum.
I haven't been able to find a fix for this one though:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: comment in <b>/.../catalog/controller/checkout/payment_method.php</b> on line <b>186</b>[]
Any help greatly appreciated
Now I have a new error
I'll post this on the nab transact extention commentsNotice: Error: Could not load template /.../catalog/view/theme/default/template/default/template/payment/nabtrans.tpl! in /.../vqmod/vqcache/vq2-system_library_template_basic.php on line 26
Reason: Added quote tags.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
The following checkout processes produce these errors - I've tried making changes, to the above suggestions, and editing shipping/payment address , but I receive internal error message, and not sure what causes it.
Any help to let me know what to replace the associated lines with, greatly appreciated
**LOGGED IN ACCOUNT CHANGE OF ADDRESS**
**REGISTER NEW ACCOUNT**SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: company in <b>/home/.../catalog/model/account/address.php</b> on line <b>4</b>
<b>Notice</b>: Undefined index: address_2 in <b>/home/.../catalog/model/account/address.php</b> on line <b>4</b>[]
**GUEST ACCOUNT**SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: fax in <b>/home/.../catalog/model/account/customer.php</b> on line <b>14</b>
<b>Notice</b>: Undefined index: company in <b>/home/.../catalog/model/account/customer.php</b> on line <b>18</b>
<b>Notice</b>: Undefined index: address_2 in <b>/home/.../catalog/model/account/customer.php</b> on line <b>18</b>[]
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: company in <b>/home/.../catalog/controller/checkout/guest.php</b> on line <b>338</b>
<b>Notice</b>: Undefined index: address_2 in <b>/home/.../catalog/controller/checkout/guest.php</b> on line <b>340</b>[]
I made these edits: same again for address_2 - THIS FIXED THE ABOVE ERRORSyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: company in <b>/home/.../catalog/controller/checkout/guest_shipping.php</b> on line <b>165</b>
<b>Notice</b>: Undefined index: address_2 in <b>/home/.../catalog/controller/checkout/guest_shipping.php</b> on line <b>167</b>[]
replaced this
Code: Select all
$this->session->data['shipping_address']['company'] = $this->request->post['company'];
}
Code: Select all
$this->session->data['shipping_address']['company'] = '';
if (!empty($this->request->post['company'])) {
$this->session->data['shipping_address']['company'] = $this->request->post['company'];
}
platypuspuzzles wrote:**GUEST ACCOUNT - CHANGE DELIVERY ADDRESS**
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined index: company in <b>/home/.../catalog/controller/checkout/guest_shipping.php</b> on line <b>165</b>
<b>Notice</b>: Undefined index: address_2 in <b>/home/.../catalog/controller/checkout/guest_shipping.php</b> on line <b>167</b>[]
I made these edits: same again for address_2 - THIS FIXED THE ABOVE ERROR
replaced thiswithCode: Select all
$this->session->data['shipping_address']['company'] = $this->request->post['company'];
Code: Select all
$this->session->data['shipping_address']['company'] = ''; if (!empty($this->request->post['company'])) { $this->session->data['shipping_address']['company'] = $this->request->post['company'];
This code change will create an missing } ending.
Code: Select all
}
Code: Select all
$this->session->data['shipping_address']['address_2'] = $this->request->post['address_2'];
Code: Select all
$this->session->data['shipping_address']['address_2'] = '';
if (!empty($this->request->post['address_2'])) {
$this->session->data['shipping_address']['address_2'] = $this->request->post['address_2'];
}

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 14 guests