[+] BO: Add BackOffice orders

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9776 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-11-02 09:18:45 +00:00
parent c4420cb657
commit 903d9b783a
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);
}
}