/** * @return void */ public function delete() { $cacheKey = OnlineShop_Framework_Impl_Cart_Resource::TABLE_NAME . "_" . $this->getId(); Zend_Registry::set($cacheKey, null); OnlineShop_Framework_Impl_CartItem::removeAllFromCart($this->getId()); OnlineShop_Framework_Impl_CartCheckoutData::removeAllFromCart($this->getId()); $this->clear(); $this->getResource()->delete(); }
/** * @return array */ public function load() { $items = array(); $cartCheckoutDataItems = $this->db->fetchAll("SELECT cartid, `key` FROM " . OnlineShop_Framework_Impl_CartCheckoutData_Resource::TABLE_NAME . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit()); foreach ($cartCheckoutDataItems as $item) { $items[] = OnlineShop_Framework_Impl_CartCheckoutData::getByKeyCartId($item['key'], $item['cartid']); } $this->model->setCartCheckoutDataItems($items); return $items; }