Sideboxes are made of two files, in this case:
/includes/modules/sideboxes/order_history.php
/includes/templates/template_default/sideboxes/tpl_order_history.php
Whether I change 1 or both files, I prefer to copy both to my templates and overrides:
/includes/modules/sideboxes/your_template_dir/order_history.php
/includes/templates/your_template_dir/sideboxes/tpl_order_history.php
In the order_history.php file change this code:
Code:
$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";
to get the products_model to read:
Code:
$products_history_query = "select p.products_id, p.products_model, pd.products_name
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id in (" . $product_ids . ")
and pd.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
order by products_name";
Also add under the line:
Code:
$customer_orders[$rows]['name'] = $products_history->fields['products_name'];
the line:
Code:
$customer_orders[$rows]['model'] = $products_history->fields['products_model'];
Then, in the tpl_order_history.php change this line:
Code:
$content .= '<li><a href="' . zen_href_link(zen_get_info_page($customer_orders[$i]['id']), 'products_id=' . $customer_orders[$i]['id']) . '">' . $customer_orders[$i]['name'] . '</a> <a href="' . zen_href_link(basename($PHP_SELF), zen_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $customer_orders[$i]['id']) . '">' . zen_image($template->get_template_dir(ICON_IMAGE_TINYCART, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_TINYCART, ICON_TINYCART_ALT) . '</a></li>' . "\n" ;
to read:
Code:
$content .= '<li><a href="' . zen_href_link(zen_get_info_page($customer_orders[$i]['id']), 'products_id=' . $customer_orders[$i]['id']) . '">' . $customer_orders[$i]['name'] . ' ' . $customer_orders[$i]['model'] . '</a> <a href="' . zen_href_link(basename($PHP_SELF), zen_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $customer_orders[$i]['id']) . '">' . zen_image($template->get_template_dir(ICON_IMAGE_TINYCART, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_TINYCART, ICON_TINYCART_ALT) . '</a></li>' . "\n" ;
You will now see both the Product Name and Product Model in the sidebox and can adjust it as needed ...