# Вкладка «Условия»

<div data-full-width="true"><figure><img src="/files/92DK9FTZwB6McryvH6lz" alt=""><figcaption></figcaption></figure></div>

Реализует разные действия для обработки полей из файла

* Не загружать<sup>1</sup> - реализация условия для поля из файла для уловия (например не загружать если кол-во меньше 1, поле из файла quantity < 1) до импорта, пропускает позицию из файла
* Выполнить<sup>2</sup> - реализует обработку поля товара, которое загружается, с помощью функций (например [preg\_replace](https://www.php.net/manual/ru/function.preg-replace.php)) до импорта

<figure><img src="/files/xLt0UnQgOTHAGHIDUD9M" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %} <sup>1</sup>В поле "Поле" указывается поле из файла (для XML это название тэга, для CSV это номер столбца или название поля если у вас в сопоставлении полей были названия)

<sup>2</sup> После выбора действия "Выполнить", сохраните настройки, выйдите и снова зайдите для настройки.

Поле "Поле" указывается название поля из базы (например marking поле артикула товара)

Функция - preg\_replace\
Значение 1 - `pattern` Искомый шаблон: строка или массив строк (`/(\w+) (\d+), (\d+)/i` или `#(\w+) (\d+), (\d+)#`)

Значение 2 - `replacement` Строка или массив строк, в которых функция будет искать и заменять совпадения (`${1}1,$3`)

Для:

все - все товары\
Только род. товар - только для родителських товаров исключая выполнение для модификаций
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.morozovpimnev.ru/megaimport/dobavlenie-importa/vkladka-usloviya.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
