• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/delivery/externallocationmap.php
  • Класс: BitrixSaleDeliveryfor
  • Вызов: for::refresh
static function refresh()
{
	set_time_limit(0);
	$result = new Result();
	$res = static::getAllLocations();

	if($res->isSuccess())
	{
		$locations = $res->getData();

		if(is_array($locations) && !empty($locations))
		{
			$res = static::setMap($locations);

			if(!$res->isSuccess())
				$result->addErrors($res->getErrors());
		}
	}
	else
	{
		$result->addErrors($res->getErrors());
	}

	return new Result();
}