/** * Get Users latest Cart * * @return bool */ public function getLatestCart() { $list = new CoreShopCart\Listing(); $list->setCondition("user__id = ?", array($this->getId())); $list->setOrderKey("o_creationDate"); $list->setOrder("DESC"); $carts = $list->getObjects(); if (count($carts) > 0) { return $carts[0]; } return false; }