-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OC 4.0.2.3 customer view order history error #13749
Comments
TheoDelaporte
added a commit
to TheoDelaporte/opencart
that referenced
this issue
Apr 19, 2024
this pull request dopes not fix anything |
orders should have payments methods so not sure what u did. maybe did not upgrade that would have changed all payment methods and shipping methods into json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of OpenCart are you reporting this for?
OC 4.0.2.3
Describe the bug
In catalog/model/account/order.php lines 81 and 97
‘payment_method’ => $order_query->row['payment_method'] ? json_decode($order_query->row['payment_method'], true) : '',
where json_decode returns null for non-JSON strings.
PHP Warning: Trying to access array offset on value of type null in public_html/oc/catalog/controller/account/order.php
What section does it affect?
Customer view order history from Account page
The error also exists for shipping_method
To Reproduce
Steps to reproduce the behavior:
The same order shows successfully in Admin console with empty payment method field, no server error page
Expected behavior
View payment history
Screenshots / Screen recordings
Server environment (please complete the following information):
cPanel Version | 116.0 (build 11)
Apache Version | 2.4.58
MySQL Version | 8.0.36
Architecture | x86_64
Operating System | linux
Shared IP Address | 45.79.178.199
Path to Sendmail | /usr/sbin/sendmail
Path to Perl | /usr/bin/perl
Perl Version | 5.26.3
Kernel Version | 4.18.0-477.21.1.lve.1.el8.x86_64
Additional context
I have no PHP experience, otherwise would post a PR
The text was updated successfully, but these errors were encountered: