If you can sort by categories_id, products_name for this ... you could customize the file:
/includes/templates/your_template_dir/sideboxes/tpl_shopping_cart.php
and add the code in RED to do this:
Code:
$products = $_SESSION['cart']->get_products();
// bof: sort by master_categories_id and products_name
function sort_products_category_name($a, $b) {
$retval = strnatcmp($a['category'], $b['category']);
if(!$retval) return strnatcmp($a['name'], $b['name']);
return $retval;
}
usort($products, 'sort_products_category_name');
// eof: sort by master_categories_id and products_name
for ($i=0, $n=sizeof($products); $i<$n; $i++) {