예제 #1
0
 /**
  * Adds new products to basket/order
  *
  * @param oxbasket $oBasket   basket to add articles
  * @param array    $aArticles article array
  */
 protected function _addArticlesToBasket($oBasket, $aArticles)
 {
     // if no order articles
     if (count($aArticles) > 0) {
         //adding order articles to basket
         foreach ($aArticles as $oArticle) {
             $aSel = isset($oArticle->oxorderarticles__oxselvariant) ? $oArticle->oxorderarticles__oxselvariant->value : null;
             $aPersParam = isset($oArticle->oxorderarticles__oxpersparam) ? $oArticle->getPersParams() : null;
             $oBasket->addToBasket($oArticle->oxorderarticles__oxartid->value, $oArticle->oxorderarticles__oxamount->value, $aSel, $aPersParam);
         }
     }
 }