original_string: protected function insertEcommerceItems($goal, $itemsToInsert)
      {
          if (empty($itemsToInsert)) {
              return;
          }
  
          Common::printDebug("Ecommerce items that are added to the cart/order");
          Common::printDebug($itemsToInsert);
  
          $items = array();
  
          foreach ($itemsToInsert as $item) {
              $items[] = $this->getItemRowEnriched($goal, $item);
          }
  
          $this->getModel()->createEcommerceItems($items);
      }
code: protected function insertEcommerceItems($goal, $itemsToInsert)
      {
          if (empty($itemsToInsert)) {
              return;
          }
  
          Common::printDebug("Ecommerce items that are added to the cart/order");
          Common::printDebug($itemsToInsert);
  
          $items = array();
  
          foreach ($itemsToInsert as $item) {
              $items[] = $this->getItemRowEnriched($goal, $item);
          }
  
          $this->getModel()->createEcommerceItems($items);
      }
code_tokens: protected function insertEcommerceItems ( $ goal , $ itemsToInsert ) { if ( empty ( $ itemsToInsert ) ) { return ; } Common :: printDebug ( "Ecommerce items that are added to the cart/order" ) ; Common :: printDebug ( $ itemsToInsert ) ; $ items = array ( ) ; foreach ( $ itemsToInsert as $ item ) { $ items [ ] = $ this -> getItemRowEnriched ( $ goal , $ item ) ; } $ this -> getModel ( ) -> createEcommerceItems ( $ items ) ; }
docstring: Inserts in the cart in the DB the new items
  that were not previously in the cart
  
  @param array $goal
  @param array $itemsToInsert
  
  @return void
docstring_tokens: Inserts in the cart in the DB the new items that were not previously in the cart