From b2f4bd8388c32849e11c416c27a2cabe80073bfe Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 12 Dec 2016 18:11:00 +0200 Subject: [PATCH] add variantSku --- console/SiteMapController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/console/SiteMapController.php b/console/SiteMapController.php index 63ecc5e..6731dc3 100755 --- a/console/SiteMapController.php +++ b/console/SiteMapController.php @@ -35,8 +35,7 @@ { return ProductVariant::find() ->with('lang') - ->with('product.lang') - ->batch(10000); + ->with('product.lang'); } @@ -160,7 +159,7 @@ $this->createRow($url, 0.8); } - foreach ($this->getVariants() as $rows) { + foreach ($this->getVariants()->batch(1000) as $rows) { foreach ($rows as $row) { if(!preg_match("@^[a-zA-Z\d]+$@i", $row->sku)) { continue; -- libgit2 0.21.4