View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001957 | OXID eShop (all versions) | 3.1. Design, GUI, UX | public | 2010-07-02 18:07 | 2013-01-15 10:04 |
Reporter | marco_steinhaeuser | Assigned To | |||
Priority | urgent | Severity | crash | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | 4.4.0 revision 28699 | ||||
Fixed in Version | 4.4.1 revision 28950 | ||||
Summary | 0001957: order history throws an error | ||||
Description | Fatal error: Call to a member function getOrderArticles() on a non-object in /var/www/CE_4.4.0/eshop/tmp/cc91668a07ab6133d5dc6342e7675fbb^%%75^752^75201DD9%%account_order.tpl.php on line 132 is displayed in http://192.168.152.128/CE_4.4.0/eshop/en/order-history/ System: Debian-Etch VMware Couldn't reproduce in Demoshop See Screenshot attached | ||||
Steps To Reproduce | Fatal error occurs when customer has no orders yet, and opened the Order History page (from My Account) (in the place where info about orders should be displayed). If user already has some orders made, the fatal error will not occur in this page. | ||||
Additional Information | found here: http://www.oxid-esales.com/forum/showthread.php?t=5910 As this is probably a bug in template and can only be fixed in 4.5.0, pls provide a solution here. Thanks! | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
has duplicate | 0001967 | resolved | dainius.bigelis | Fatal error occurs in Order History page when there are no orders yet |
|
I am, who had this issue... Yesterday I could solve it by my own. This is my solution: I found the problem in the file ..\out\basic\tpl\account_order.tpl. In the 11th line there is the following code: [{if count($oView->getOrderList()) > 0 }] But the result of count($oView->getOrderList()) do not fit to the expression in the if-statement. But in the file inc\account_header.tpl, there is a correct command to show the number of the orders. So I took this command to replace the fail command mentioned above. So I replaced the line above with the following code: [{if $oView->getOrderCnt() >= 1 }] And now it works great ;) You can take it for the future versions. I hope, I could help you ;) If you have any questions concerning this solution, just send me an email... |
|
Solved it in Account_Order::getOrderList(). If order is not set, it returns empty array. |