[[Order History]]

#set( $itemsearcher = $searcherManager.getSearcher($catalogid,"orderitem" )) #set( $q = $itemsearcher.createSearchQuery() ) #set( $null = $q.addExact("assetid",$asset.id) ) #set( $hits = $itemsearcher.cachedSearch($context,$q) ) #if( $hits.size() > 0 ) ##this wont work due to lack of hits in session $context.putPageValue("targetdiv","orderhistory") $context.putPageValue("hits",$hits) $context.putPageValue("resultsPage","$content.path?assetid=$asset.id&oemaxlevel=1") $pages.include("$apphome/components/results/pages.html",$context)
T #foreach( $item in $hits.getPageOfHits() ) #set( $order = $searcherManager.getData($catalogid,"order",$item.orderid ) ) #set( $status = $searcherManager.getData($catalogid,"orderstatus",$order.orderstatus )) $context.putPageValue("val",$order.userid) #end
[[Order Number]] [[User]] [[Date]] [[Status]]
$order.id$pages.include("/$applicationid/components/xml/typesreadonly/user.html" ,$context) $context.getDateTime($order.date)$!status
#else

[[No orders have been placed for this asset]]

#end