Execute($orders_history_query);
if ($orders_history->RecordCount() > 0) {
$product_ids = '';
while (!$orders_history->EOF) {
$product_ids .= (int)$orders_history->fields['products_id'] . ',';
$orders_history->MoveNext();
}
$product_ids = substr($product_ids, 0, -1);
$rows=0;
$customer_orders_string = '
';
$products_history_query = "select products_id, products_name
from " . TABLE_PRODUCTS_DESCRIPTION . "
where products_id in (" . $product_ids . ")
and language_id = '" . (int)$_SESSION['languages_id'] . "'
order by products_name";
$products_history = $db->Execute($products_history_query);
while (!$products_history->EOF) {
$rows++;
$customer_orders[$rows]['id'] = $products_history->fields['products_id'];
$customer_orders[$rows]['name'] = $products_history->fields['products_name'];
$products_history->MoveNext();
}
$customer_orders_string .= '
';
require($template->get_template_dir('tpl_order_history.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_order_history.php');
$title = BOX_HEADING_CUSTOMER_ORDERS;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
}
?>