[+] 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user