in 2.0.x-2.2.x/upload/catalog/controller/module/facebook_business.php [319:342]
private function writeProductFeedFileInBatch($product_total, $feed_file) {
$total_batches = ceil($product_total / 100);
for ($batch_number = 0; $batch_number < $total_batches; $batch_number++) {
$filter_data = array(
'start' => $batch_number * 100,
'limit' => 100,
'filter_status' => 1
);
$products = $this->model_module_facebook_business->getProducts($filter_data);
if (isset($products) && sizeof($products) > 0) {
if (!$this->writeProductFeedFile($products, $feed_file)) {
fclose($feed_file);
return false;
}
}
}
// Feed file generation is successful
fclose($feed_file);
return true;
}