Hi there
Am about to launch a teacommerce install, but have one aspect causing me to scratch my head...
I need add a custom user control to the dashboard of the site to facilitate some custom reporting.
The reportnig requirements are 2 fold:
1. Download a CSV file of orders within a given date range (date pickers within the user control) and for a given region (dropdown list within the user control).
2 Create PDF files of all orders (as matched above) and download as a single ZIP file.
To facilitate the above I have 2 custom properties recorded on each order - a date completed and a region ID (node from the content tree).
For now the only way I have been able to make progress in getting some reporting working is a follows:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(HttpContext.Current.Server.MapPath("~/App_Data/TeaCommerce/orders.xml"));
XmlNodeList orders = xmlDoc.SelectNodes("/orders/order[string(properties/orderInvoiced) != '' and <<<more filtering to go in here>>>]");
foreach (XmlNode n in orders)
{
...
}
Can anyone suggest a better way ?
The prime consideration is being able to check the custom date property against the selected date range.
Thanks
Nigel