Skip to content

Instantly share code, notes, and snippets.

@rodde177
Created July 20, 2015 08:43
Show Gist options
  • Select an option

  • Save rodde177/e61f2f4b3b40629ac130 to your computer and use it in GitHub Desktop.

Select an option

Save rodde177/e61f2f4b3b40629ac130 to your computer and use it in GitHub Desktop.
batch
/*$pages = $collection->getLastPageNumber();
$currentPage = 1;
$totalCount = $collection->getSize();
$totalOffset = ceil((int)$totalCount/10);
var_dump($pages);
do {
$collection->setCurPage($currentPage);
foreach ($collection as $prod) {
var_dump($prod->getId());
var_dump($prod->getName());
var_dump($prod->isConfigurable());
}
$currentPage++;
print_r('page: '.$currentPage);
$collection->clear();
} while ($currentPage <= $pages);
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment