bagisto-bulk-upload icon indicating copy to clipboard operation
bagisto-bulk-upload copied to clipboard

Uploading simple products records more than 1000

Open DarussalamTech opened this issue 4 years ago • 1 comments

When we upload products csv having more than 1000 records, the count is adjusted per 100 products in SimpleProductRepository@createProduct line# 165

if ($requestData['totalNumberOfCSVRecord'] < 1000) {
    $processCSVRecords = $requestData['totalNumberOfCSVRecord']/($requestData['totalNumberOfCSVRecord']/10);
} else {
    $processCSVRecords = $requestData['totalNumberOfCSVRecord']/($requestData['totalNumberOfCSVRecord']/100);
}

it should be either

if ($requestData['totalNumberOfCSVRecord'] < 1000) {
    $processCSVRecords = $requestData['totalNumberOfCSVRecord']/($requestData['totalNumberOfCSVRecord']/10);
} else {
    $processCSVRecords = $requestData['totalNumberOfCSVRecord']/($requestData['totalNumberOfCSVRecord']/10);
}

where we just use 10 products bag or when storing products we should add 100 products for records more than 1000

Secondly why we are using $requestData['totalNumberOfCSVRecord']/($requestData['totalNumberOfCSVRecord']/10); when we can just use 10 instead.

I encountered this issue and have fixed on my side by changing the value of $processCSVRecords to 10

DarussalamTech avatar Feb 02 '21 11:02 DarussalamTech

Hello @DarussalamTech ,

Thanks for mentioning the bug. Also, you may do respective PR (Pull Request) for the issue.

Thanks

prateek-webkul avatar Feb 16 '21 06:02 prateek-webkul