Created
March 9, 2018 13:41
-
-
Save bluvertigo/155197a3e4d0b19f5aafe7d578d57941 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function create() | |
{ | |
$productCollection = $this->_getProductCollection(); | |
$pages = $productCollection->getLastPageNumber(); | |
$pageNumber = 1; | |
do { | |
$productCollection->setCurPage($pageNumber); | |
$productCollection->load(); | |
foreach ($productCollection as $product) { | |
// Process product information and write it to file.... | |
} | |
$pageNumber++; | |
$productCollection->clear(); | |
$productCollection = $this->_getProductCollection(); | |
} while ($pageNumber <= $pages); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment