Forums / Setup & design / problem with customerorderview.tpl

problem with customerorderview.tpl

Author Message

christian bencivenni

Friday 30 November 2007 3:22:29 am

I'm tring to visualize the user orders but i have a problem with /shop/customerorderview.tpl
I overrided it for a personalization but the array $order_list seems to be of zero elements.
How can I fetch a list of a user orders?

I'm tring with fetch functions but I have no idea about the class id of an order.

Thanks in advance

Pascal Specht

Friday 30 November 2007 4:18:04 am

Hi Christian,

At some point the customerorderview.tpl gets feeded by the corresponding PHP module, via the following code:

$Email = urldecode( $Email );
$productList =& eZOrder::productList( $CustomerID, $Email );
$orderList =& eZOrder::orderList( $CustomerID, $Email );

$tpl->setVariable( "product_list", $productList );
$tpl->setVariable( "order_list", $orderList );

I guess you will have to look at your php module that instantiates you template, and do something similar there.

Hope this helps,

</Pascal>

christian bencivenni

Friday 30 November 2007 5:24:43 am

mmmm...
thanks Pascal.
I hoped do not need to change .php

I'm searching a way to make a Fetch ezorder object but I don't know...

Any idea?