• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/product/systemfield/productmapping/setdefaultvaluestepper.php
  • Класс: BitrixCatalogProductSystemFieldProductMappingSetDefaultValueStepper
  • Вызов: SetDefaultValueStepper::firstRun
private function firstRun(array & $option): bool
{
	$existUfTable = Application::getConnection()->query("SHOW TABLES LIKE 'b_uts_product'")->getSelectedRowsCount() > 0;
	if (!$existUfTable)
	{
		return self::FINISH_EXECUTION;
	}

	$existUfColumn = Application::getConnection()->query("SHOW COLUMNS FROM `b_uts_product` LIKE 'UF_PRODUCT_MAPPING'")->getSelectedRowsCount() > 0;
	if (!$existUfColumn)
	{
		return self::FINISH_EXECUTION;
	}

	if (!$this->isNotEmptyProducts())
	{
		return self::FINISH_EXECUTION;
	}

	$count = $this->getProductsToBeProcessedTotalCount();
	if ($count === 0)
	{
		return self::FINISH_EXECUTION;
	}

	$option['count'] = $count;
	$option['title'] = self::getTitle();
	$option['is_started'] = true;
	$option['last_id'] = null;

	return self::CONTINUE_EXECUTION;
}