Adds article to order list.
185766
public function addThisArticle()
    {
        $sOxid = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid');
        $dAmount = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('am');
        $oProduct = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

        if ($sOxid && $dAmount && $oProduct->load($sOxid)) {
            $sOrderId = $this->getEditObjectId();
            $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
            if ($sOrderId && $oOrder->load($sOrderId)) {
                $oOrderArticle = oxNew(\OxidEsales\Eshop\Application\Model\OrderArticle::class);
                $oOrderArticle->oxorderarticles__oxartid = new \OxidEsales\Eshop\Core\Field($oProduct->getId());
                $oOrderArticle->oxorderarticles__oxartnum = new \OxidEsales\Eshop\Core\Field($oProduct->oxarticles__oxartnum->value);
                $oOrderArticle->oxorderarticles__oxamount = new \OxidEsales\Eshop\Core\Field($dAmount);
                $oOrderArticle->oxorderarticles__oxselvariant = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sel'));
                $oOrder->recalculateOrder([$oOrderArticle]);
            }
        }
    }
978517
def addfirst(self, item, new_priority=None):
        """"""

        with self.lock:

            self_data = self.data

            try:
                priority = self_data[0][1]
                if new_priority is not None:
                    if new_priority < priority:
                        raise ValueError('Priority must be >= '
                                         'highest priority.')
                    else:
                        priority = new_priority
            except IndexError:
                priority = 0 if new_priority is None else new_priority

            self_data.appendleft((item, priority))
            self_items = self.items
            maxlen = self._maxlen

            try:
                self_items[item] += 1
            except TypeError:
                self_items[repr(item)] += 1

            if maxlen is not None and maxlen < len(self_data):
                self._poplast()
291448
def add_child(self, item):
        """"""
        item.depth = self.depth + 1
        self.childs.append(item)
        self.childs = sorted(self.childs, key=lambda item: item.order if item.order else 999)
1038711
public function addArticleBundle()
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sQuotedChosenArt = $oDb->quote(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxbundleid'));
        $sQuotedOxId = $oDb->quote(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid'));

        $sQ = "update oxarticles set oxarticles.oxbundleid =  {$sQuotedChosenArt} " .
              "where oxarticles.oxid  =  {$sQuotedOxId} ";
        $oDb->Execute($sQ);
    }
413550
public UploadMediaResponse uploadNews(List<Article> articles){
        UploadMediaResponse response;
        String url = BASE_API_URL + "cgi-bin/media/uploadnews?access_token=#";
        final Map<String, Object> params = new HashMap<String, Object>();
        params.put("articles", articles);
        BaseResponse r = executePost(url, JSONUtil.toJson(params));
        response = JSONUtil.toBean(r.getErrmsg(), UploadMediaResponse.class);
        return response;
    }
628063
public function addsel()
    {
        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        if ($oArticle->load($this->getEditObjectId())) {
            //Disable editing for derived articles
            if ($oArticle->isDerived()) {
                return;
            }

            $this->resetContentCache();

            if ($aSels = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("allsel")) {
                $oVariantHandler = oxNew(\OxidEsales\Eshop\Application\Model\VariantHandler::class);
                $oVariantHandler->genVariantFromSell($aSels, $oArticle);
            }
        }
    }
460264
public function listOrder()
    {
        $this->actionListOrder();
        $this->setTitleListOrder();
        $this->setBreadcrumbListOrder();
        $this->setData('statuses', $this->order->getStatuses());

        $this->setFilterListOrder();
        $this->setPagerListOrder();
        $this->setData('orders', $this->getListOrder());

        $this->outputListOrder();
    }
579239
function editArticleInList(articles, level, newArticle) {
    return articles.map(function(article) {
        var articleLevel = article.getLevel();

        if (articleLevel === level) {
            // it is the article to edit
            return article.merge(newArticle);
        } else if (level.indexOf(articleLevel) === 0) {
            // it is a parent
            var articles = editArticleInList(article.getArticles(), level, newArticle);
            return article.set('articles', articles);
        } else {
            // This is not the article you are looking for
            return article;
        }
    });
}
1140769
public UploadMaterialResponse uploadMaterialNews(List<Article> articles){
        UploadMaterialResponse response;
        String url = BASE_API_URL + "cgi-bin/material/add_news?access_token=#";
        final Map<String, Object> params = new HashMap<String, Object>();
        params.put("articles", articles);
        BaseResponse r = executePost(url, JSONUtil.toJson(params));
        String resultJson = isSuccess(r.getErrcode()) ? r.getErrmsg() : r.toJsonString();
        response = JSONUtil.toBean(resultJson, UploadMaterialResponse.class);
        return response;
    }
972356
public void add(Article article) {
		// Get Write Access
		SQLiteDatabase db = this.getWritableDatabase();

		// Build Content Values
		ContentValues values = new ContentValues();
		values.put(KEY_TAGS, TextUtils.join("_PCX_", article.getTags()));
		values.put(KEY_MEDIA_CONTENT, Article.MediaContent.toByteArray(article.getMediaContent()));
		values.put(KEY_SOURCE, article.getSource().toString());
		values.put(KEY_IMAGE, article.getImage().toString());
		values.put(KEY_TITLE, article.getTitle());
		values.put(KEY_DESCRIPTION, article.getDescription());
		values.put(KEY_CONTENT, article.getContent());
		values.put(KEY_COMMENTS, article.getComments());
		values.put(KEY_AUTHOR, article.getAuthor());
		values.put(KEY_DATE, article.getDate());
		values.put(KEY_ID, article.getId());

		// Insert & Close
		db.insert(TABLE_ARTICLES, null, values);
		db.close();
	}
888837
protected function LoadArticleList()
    {
        if (is_null($this->oList)) {
            $iListIdent = $this->global->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME);
            if ($iListIdent) {
                $this->oList = TdbShopArticleList::GetInstanceFromSession($iListIdent);
            }
            if (is_null($this->oList)) {
                $oActiveCategory = self::GetActiveCategory();
                /** @var $oActiveCategory TdbShopCategory */
                $sOrderListBy = $this->GetActiveOrderByString($this->iActiveShopModuleArticlelistOrderbyId);
                if (!is_null($oActiveCategory)) {
                    if ($this->oModuleConf->fieldShowSubcategoryProducts) {
                        $this->oList = $oActiveCategory->GetArticleListIncludingSubcategories($sOrderListBy, $this->aFilter);
                    } else {
                        $this->oList = $oActiveCategory->GetArticleList($sOrderListBy, $this->aFilter);
                    }
                } else {
                    $this->oList = $this->getListWhenNoCategoryDefined($sOrderListBy, $this->aFilter);
                }
            }

            $this->PostLoadArticleListHook();

            if (!is_null($this->oList)) {
                $this->oList->RestorePagingInfoFromSession($this->iPageSize * $this->iPage, $this->iPageSize);

                $sRequest = $this->global->GetUserData(TdbShopArticleList::URL_LIST_REQUEST);
                $this->oList->HandleURLRequest($sRequest, true);
            }
        }
    }
158951
protected function _processListArticles()
    {
        $sAddDynParams = $this->getAddUrlParams();
        if ($sAddDynParams && ($aArtList = $this->getArticleList())) {
            $blSeo = \OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive();
            foreach ($aArtList as $oArticle) {
                // appending std and dynamic urls
                if (!$blSeo) {
                    // only if seo is off..
                    $oArticle->appendStdLink($sAddDynParams);
                }
                $oArticle->appendLink($sAddDynParams);
            }
        }
    }
1207842
function addToList(i, L, R) {
    R[L[i + 1]] = R[i];
    L[R[i]] = L[i + 1];
    R[i] = i + 1;
    L[i + 1] = i;
}
23834
private function InitCategoryArticles()
    {
        $tblArticle = Article::Schema()->Table();
        $sql = Access::SqlBuilder();
        $orderBy = $sql->OrderList($sql->OrderDesc($tblArticle->Field('Created')));
        $this->articles = Article::Schema()->FetchByCategory(false, $this->category, $orderBy, null, $this->ArticleOffset(), $this->perPage);
        $this->articlesTotal = Article::Schema()->CountByCategory(false, $this->category);
    }
525013
public function addListCommands()
    {
        $story = $this->getController()->getItem();

        if ($story->authorize('vote')) {
            $this->getController()->setItem($story->object);
            $this->addCommand('vote');
            $this->getController()->setItem($story);
        }

        if ($story->authorize('add.comment')) {
            $this->getController()->setItem($story->object);

            $this->addCommand('comment')
                 ->getCommand('comment')
                 ->storyid($story->id);

            $this->getController()->setItem($story);
        }

        if ($story->numOfComments > 10) {
            $this->addCommand('view');
        }

        if ($story->authorize('delete')) {
            $this->addCommand('delete');
        }
    }
1153514
public function UpdateOrderById($iId)
    {
        $this->sqlData['shop_module_articlelist_orderby_id'] = $iId;
        $this->fieldShopModuleArticlelistOrderbyId = $iId;
        $oItem = null;
        $this->SetInternalCache('oLookupshop_module_articlelist_orderby_id', $oItem);
    }
395162
private function _addShipmentsToOrder()
    {
        for ($i=1; $i<=$this->queryStringParams["totalShipments"];$i++) {
            $this->exampleClass->addShipmentToOrder(
                $this->queryStringParams["item".$i]
            );
        }
    }