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);
    }
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);
    }
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 ) ; }
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
Inserts in the cart in the DB the new items that were not previously in the cart