Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 /**
  * Get all existing Carts
  *
  * @return array CoreShopCart
  */
 public static function getAll()
 {
     $list = new CoreShopCart\Listing();
     return $list->getObjects();
 }