Qs_Request::getPostValue('productId'), 'quantity' => self::QUANTITY_TO_ADD, ]; $cartItemObj = new CartItemObj(); $this->_getDataObj()->setPrimaryKey($cartData['productCategoryId']); $data = $this->_getDataObj()->clearData()->getData(); //if cartItem is already in cart - do not allow to add $item = $this->_getCart()->getItem(array( 'productCategoryId' => $this->_getDataObj()->getPrimaryKey(), 'cartItemType' => CartItemObj::ITEM_TYPE )); if ($item) { $this->_setBackError('Sponsorship is already in cart'); $this->_doBack(); } if ($data && is_array($data)) { $cartData += $data; } $cartData['description'] = ''; $cartItemObj->setCartItemData($cartData); $cartItemObj->prepareCartItemData(); $this->_getCart()->addItem($cartItemObj->getCartItemData()); $cartUrl = App_ECommerce_Cart_View::getPage('url'); if ($cartUrl) { $this->_setBackUrl($cartUrl); } $this->_doBack(); } protected function _getListItem() { $list = parent::_getListItem(); $list['cartUrl'] = static::getPage('url'); return $list; } }