Post by westswamp » Tue Nov 29, 2022 8:36 pm

Hello!
I have problem with checkout comments. It's not saving in database.
Even if I save comment in order at admin side it's not saving to database.
Database oc_order field "comment" is still empty.
OC is fresh install. No additional extensions.

Newbie

Posts

Joined
Tue Nov 29, 2022 7:31 pm

Post by straightlight » Tue Nov 29, 2022 11:18 pm

westswamp wrote:
Tue Nov 29, 2022 8:36 pm
Hello!
I have problem with checkout comments. It's not saving in database.
Even if I save comment in order at admin side it's not saving to database.
Database oc_order field "comment" is still empty.
OC is fresh install. No additional extensions.
OC version. Server error logs.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by westswamp » Tue Nov 29, 2022 11:50 pm

straightlight wrote:
Tue Nov 29, 2022 11:18 pm
westswamp wrote:
Tue Nov 29, 2022 8:36 pm
Hello!
I have problem with checkout comments. It's not saving in database.
Even if I save comment in order at admin side it's not saving to database.
Database oc_order field "comment" is still empty.
OC is fresh install. No additional extensions.
OC version. Server error logs.
OC latest 4.0.1.1
PHP 8.1
Server error logs: only this recurring

Code: Select all

PHP Unknown: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
File: /extension/opencart/admin/controller/dashboard/map.php
Line: 84

Newbie

Posts

Joined
Tue Nov 29, 2022 7:31 pm

Post by straightlight » Wed Nov 30, 2022 12:33 am

Interesting.

See by changing:

Code: Select all

$json[strtolower($result['iso_code_2'])] = [
into:

Code: Select all

$json[oc_strtolower($result['iso_code_2'])] = [
or by changing into:

Code: Select all

$json[$result['iso_code_2']] = [
if that would solve the issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by westswamp » Wed Nov 30, 2022 4:14 am

straightlight wrote:
Wed Nov 30, 2022 12:33 am
Interesting.

See by changing:

Code: Select all

$json[strtolower($result['iso_code_2'])] = [
into:

Code: Select all

$json[oc_strtolower($result['iso_code_2'])] = [
or by changing into:

Code: Select all

$json[$result['iso_code_2']] = [
if that would solve the issue.

Code: Select all

$json[oc_strtolower($result['iso_code_2'])] = [

Code: Select all

Error:  Call to undefined function Opencart\Admin\Controller\Extension\Opencart\Dashboard\oc_strtolower()
File: extension/opencart/admin/controller/dashboard/map.php
Line: 84
_________________________________________________

Code: Select all

$json[$result['iso_code_2']] = [
No error in log at the moment.

Now I found out how I can save comment in order admin view. First I have to refresh shipping and payment, then write comment and confirm.
But this will not solve problem because customer entered comment not still saving in database.

Newbie

Posts

Joined
Tue Nov 29, 2022 7:31 pm

Post by straightlight » Wed Nov 30, 2022 4:19 am

westswamp wrote:
Wed Nov 30, 2022 4:14 am
straightlight wrote:
Wed Nov 30, 2022 12:33 am
Interesting.

See by changing:

Code: Select all

$json[strtolower($result['iso_code_2'])] = [
into:

Code: Select all

$json[oc_strtolower($result['iso_code_2'])] = [
or by changing into:

Code: Select all

$json[$result['iso_code_2']] = [
if that would solve the issue.

Code: Select all

$json[oc_strtolower($result['iso_code_2'])] = [

Code: Select all

Error:  Call to undefined function Opencart\Admin\Controller\Extension\Opencart\Dashboard\oc_strtolower()
File: extension/opencart/admin/controller/dashboard/map.php
Line: 84
_________________________________________________

Code: Select all

$json[$result['iso_code_2']] = [
No error in log at the moment.

Now I found out how I can save comment in order admin view. First I have to refresh shipping and payment, then write comment and confirm.
But this will not solve problem because customer entered comment not still saving in database.
See with the MB version, in a test environment, in regard with the oc_strtolower helper function if it solves the issue or, as per the above, by simply removing the strtolower function if it will solve the issue. As for the checkout comment, if this issue can be reproduced in the MB version, I would suggest to create an issue at the Github Opencart repository. Also, keep monitoring the error logs with the customer comment since this issue might be caused by one of your Event Triggers.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 15 guests