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);
}