add this additional attribute code before
$rowData = $this->_prepareRowForDb($rowData);
file path
/vendor/magento/module-import-export/Model/Import/Entity/AbstractEntity.php
Function
protected function _saveValidatedBunches()
{
$source = $this->_getSource();
$currentDataSize = 0;
$bunchRows = [];
$startNewBunch = false;
$nextRowBackup = [];
$maxDataSize = $this->_resourceHelper->getMaxDataSize();
$bunchSize = $this->_importExportData->getBunchSize();
$skuSet = [];
$source->rewind();
$this->_dataSourceModel->cleanBunches();
while ($source->valid() || $bunchRows) {
if ($startNewBunch || !$source->valid()) {
$this->_dataSourceModel->saveBunch($this->getEntityTypeCode(), $this->getBehavior(), $bunchRows);
$bunchRows = $nextRowBackup;
$currentDataSize = strlen($this->getSerializer()->serialize($bunchRows));
$startNewBunch = false;
$nextRowBackup = [];
}
if ($source->valid()) {
try {
$rowData = $source->current();
if (array_key_exists('sku', $rowData)) {
$skuSet[$rowData['sku']] = true;
}
} catch (\InvalidArgumentException $e) {
$this->addRowError($e->getMessage(), $this->_processedRowsCount);
$this->_processedRowsCount++;
$source->next();
continue;
}
$this->_processedRowsCount++;
if ($this->validateRow($rowData, $source->key())) {
// add row to bunch for save
$pre_order_qty = $rowData['qty'];
if($rowData['additional_attributes'])
{
if($rowData['additional_attributes'] != '')
{
$rowData['additional_attributes'] = $rowData['additional_attributes'].',preorder_custom_qty='.$pre_order_qty;
}
else
{
$rowData['additional_attributes'] = 'preorder_custom_qty='.$pre_order_qty;
}
}
else
{
$rowData['additional_attributes'] = 'preorder_custom_qty='.$pre_order_qty;
}
$rowData = $this->_prepareRowForDb($rowData);
$rowSize = strlen($this->jsonHelper->jsonEncode($rowData));
$isBunchSizeExceeded = $bunchSize > 0 && count($bunchRows) >= $bunchSize;
if ($currentDataSize + $rowSize >= $maxDataSize || $isBunchSizeExceeded) {
$startNewBunch = true;
$nextRowBackup = [$source->key() => $rowData];
} else {
$bunchRows[$source->key()] = $rowData;
$currentDataSize += $rowSize;
}
}
$source->next();
}
}
$this->_processedEntitiesCount = (count($skuSet)) ? : $this->_processedRowsCount;
return $this;
}
the main code is
$pre_order_qty = $rowData['qty'];
if($rowData['additional_attributes'])
{
if($rowData['additional_attributes'] != '')
{
$rowData['additional_attributes'] = $rowData['additional_attributes'].',preorder_custom_qty='.$pre_order_qty;
}
else
{
$rowData['additional_attributes'] = 'preorder_custom_qty='.$pre_order_qty;
}
}
else
{
$rowData['additional_attributes'] = 'preorder_custom_qty='.$pre_order_qty;
}
$rowData = $this->_prepareRowForDb($rowData);