[-] FO : #PSCFV-3318 - Guest Tracking must use order reference and not order id

This commit is contained in:
mDeflotte
2012-07-25 13:00:43 +00:00
parent aee069e189
commit 321cf45847
+15
View File
@@ -1218,6 +1218,21 @@ class OrderCore extends ObjectModel
return new Order((int)($res['id_order']));
}
/**
* Get a collection of orders using reference
*
* @since 1.5.0.14
*
* @param string $reference
* @return Collection of Order
*/
public static function getByReference($reference)
{
$orders = new Collection('Order');
$orders->where('reference', '=', $reference);
return $orders;
}
public function getTotalWeight()
{
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('