View Issue Details

IDProjectCategoryView StatusLast Update
0001957OXID eShop (all versions)3.1. Design, GUI, UXpublic2013-01-15 10:04
Status resolvedResolutionfixed 
Product Version4.4.0 revision 28699 
Target VersionFixed in Version4.4.1 revision 28950 
Summary0001957: order history throws an error
DescriptionFatal 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

System: Debian-Etch VMware
Couldn't reproduce in Demoshop

See Screenshot attached
Steps To ReproduceFatal 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 Informationfound here:

As this is probably a bug in template and can only be fixed in 4.5.0, pls provide a solution here. Thanks!
TagsNo tags attached.
PHP Versionany
Database Versionany


has duplicate 0001967 resolveddainius.bigelis Fatal error occurs in Order History page when there are no orders yet 



2010-07-02 18:07


Clipboard01.jpg (125,875 bytes)
Clipboard01.jpg (125,875 bytes)


2010-07-13 12:31

reporter   ~0003257

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...


2010-07-21 09:00

manager   ~0003285

Solved it in Account_Order::getOrderList(). If order is not set, it returns empty array.