[+] BO: Add BackOffice orders

This commit is contained in:
rGaillard
2011-11-02 09:18:45 +00:00
parent a44f5fc8a1
commit bf3d89e1fb
9 changed files with 1156 additions and 26 deletions
+10
View File
@@ -677,4 +677,14 @@ class CustomerCore extends ObjectModel
Context::getContext()->cookie->mylogout();
$this->logged = 0;
}
public function getLastCart()
{
$carts = Cart::getCustomerCarts((int)$this->id);
if (!count($carts))
return false;
$cart = array_shift($carts);
$cart = new Cart((int)$cart['id_cart']);
return ($cart->nbProducts() === 0 ? (int)$cart->id : false);
}
}