27 private bool $isUseCatalogTab =
false;
28 private bool $isUseSkuSelector =
false;
32 $this->isUseCatalogTab = $value;
37 $this->isUseSkuSelector = $value;
42 $result = parent::prepareFieldAssemblers();
44 if ($this->isUseSkuSelector)
47 'PRODUCT', $this->settings
54 $this->settings->getUrlBuilder()
60 $this->settings->getUrlBuilder()
83 private function getClearedProductFields(): array
87 $baseClearSkuFields = [
93 'PURCHASING_CURRENCY',
103 if (!$this->isUseSkuSelector && !$this->isUseCatalogTab)
108 if (!$this->isUseCatalogTab)
131 private function clearProductFields(array $rowsList): array
133 $clearedFields = $this->getClearedProductFields();
135 foreach ($rowsList as $index => $rowItem)
137 $productType = (int)($rowList[$index][
'data'][
'TYPE'] ?? 0);
138 if (isset($clearedFields[$productType]))
140 foreach ($clearedFields[$productType] as $fieldName)
142 if (isset($rowList[$index][
'data'][$fieldName]))
144 $rowList[$index][
'data'][$fieldName] =
'';
155 $rowsList = $this->clearProductFields($rowsList);
157 return parent::prepareRows($rowsList);