ok, here we go.... no guarantees!
restore the original code from my changes above!
includes/classes/order.php line 464, we are adding 1 line:
Code:
'id' => $products[$i]['id'],
'manufacturers_id' => $products[$i]['manufacturers_id'],
'rowClass' => $rowClass);
line 719 (or thereabouts), add another line:
Code:
$this->email_low_stock='';
usort($this->products, "manuf_cmp");
for ($i=0, $n=sizeof($this->products); $i<$n; $i++) {
in includes/classes/shopping_cart.php on 1206:
Code:
$products_array = array();
reset($this->contents);
while (list($products_id, ) = each($this->contents)) {
$products_query = "select p.products_id, p.master_categories_id, p.products_status, pd.products_name, p.products_model, p.products_image,
p.products_price, p.products_weight, p.products_tax_class_id,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_quantity_order_max,
p.product_is_free, p.products_priced_by_attribute, p.manufacturers_id,
p.products_discount_type, p.products_discount_type_from, p.products_virtual, p.product_is_always_free_shipping
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = '" . (int)$products_id . "'
and pd.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
finally a new file:
includes/extra_datafiles/my_mods.php
Code:
function manuf_cmp($a, $b)
{
return $a['manufacturers_id'] - $b['manufacturers_id'];
}
let us know how it goes!
note, this will sort based on the numerical value of the key assigned to the manufacturer. not the manufacturers name....
best.
Bookmarks