figured this out.- adding here in case it can help someone else
1. in my addon's func.php added custom function
function fn_getorderlist() {
$data=db_get_array('select concat(order_id,"%",total,"%",shipping_cost,"%",firstname," ",lastname,"%",email) as odata, order_id from ?:orders order by order_id desc;');
return $data;
}
in the main controller added
$view->assign('order_data',fn_getorderlist());
then in the template used {foreach} loop to create the select box, using the order_data. had an onchange javascript event to take the value, split to individual elements and apply the values to the relevant fields on the template.
|