Piwik\Tracker\GoalManager::updateEcommerceItems PHP Method

updateEcommerceItems() protected method

Updates the cart items in the DB that have been modified since the last cart update
protected updateEcommerceItems ( array $goal, array $itemsToUpdate ) : void
$goal array
$itemsToUpdate array
return void
    protected function updateEcommerceItems($goal, $itemsToUpdate)
    {
        if (empty($itemsToUpdate)) {
            return;
        }
        Common::printDebug("Goal data used to update ecommerce items:");
        Common::printDebug($goal);
        foreach ($itemsToUpdate as $item) {
            $newRow = $this->getItemRowEnriched($goal, $item);
            Common::printDebug($newRow);
            $this->getModel()->updateEcommerceItem($item['idorder_original_value'], $newRow);
        }
    }