// BugFix : Adding warehouse on order edition

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11214 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-12-14 16:19:05 +00:00
parent 6d99193df7
commit b48c20d1d5
9 changed files with 135 additions and 24 deletions
+22
View File
@@ -1567,5 +1567,27 @@ class OrderCore extends ObjectModel
return true;
return false;
}
/**
* Get warehouse associated to the order
*
* return array List of warehouse
*/
public function getWarehouseList()
{
$results = Db::getInstance()->executeS('
SELECT id_warehouse
FROM `'._DB_PREFIX_.'order_detail`
WHERE `id_order` = '.(int)$this->id.'
GROUP BY id_warehouse');
if (!$results)
return array();
$warehouse_list = array();
foreach ($results as $row)
$warehouse_list[] = $row['id_warehouse'];
return $warehouse_list;
}
}