
Originally Posted by
swguy
Look at includes/classes/order.php line 285. That's the product select for the products in the order. You want to join orders_products with products on the products_id field so you can get products.manufacturers_id, and order on that.
Yep, I tried that but the following doesn't work
Code:
$this->billing['zone_id'] = $this->getCountryZoneId((int)$this->billing['country'], $this->billing['state']);
//Melanie sort orders by manufacturer
$index = 0;
$orders_products_query = "SELECT *
FROM " . TABLE_ORDERS_PRODUCTS . "
WHERE orders_id = " . (int)$this->orderId . "
ORDER BY products_manufacturers ASC";
$orders_products = $db->Execute($orders_products_query);
while (!$orders_products->EOF) {
// convert quantity to proper decimals - account history
Bookmarks