From 31aec751f505dba431db31867f5069c8dcbf0c6d Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 14 Dec 2016 18:36:06 +0200 Subject: [PATCH] sitemap generator update --- console/controllers/SiteMapController.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/console/controllers/SiteMapController.php b/console/controllers/SiteMapController.php index 9b72340..aa1080a 100644 --- a/console/controllers/SiteMapController.php +++ b/console/controllers/SiteMapController.php @@ -193,25 +193,25 @@ class SiteMapController extends Controller -// foreach($this->getCategories() as $category){ -// foreach ($this->getFilters($category) as $filter1) { -// foreach ($this->getFilters($category) as $filter2) { -// if($this->checkFilter($category, [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] )){ -// $url = Url::to(['catalog/category', 'category' => $category, 'filters' => [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] ]); -// $this->createRow($url , 0.7, $content); -// } -// -// } -// -// foreach ($this->getBrands($category) as $brand) { -// if($this->checkFilter($category, ['brands' => [$brand->brand_id], $filter1['group_alias'] => [$filter1['option_alias']]] )){ -// $url = Url::to(['catalog/category', 'category' => $category, 'filters' => ['brands' => [$brand->alias],$filter1['group_alias'] => [$filter1['option_alias']]]]); -// $this->createRow($url , 0.7,$content); -// } -// -// } -// } -// } + foreach($this->getCategories() as $category){ + foreach ($this->getFilters($category) as $filter1) { + foreach ($this->getFilters($category) as $filter2) { + if($this->checkFilter($category, [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] )){ + $url = Url::to(['catalog/category', 'category' => $category, 'filters' => [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] ]); + $this->createRow($url , 0.7, $content); + } + + } + + foreach ($this->getBrands($category) as $brand) { + if($this->checkFilter($category, ['brands' => [$brand->brand_id], $filter1['group_alias'] => [$filter1['option_alias']]] )){ + $url = Url::to(['catalog/category', 'category' => $category, 'filters' => ['brands' => [$brand->alias],$filter1['group_alias'] => [$filter1['option_alias']]]]); + $this->createRow($url , 0.7,$content); + } + + } + } + } -- libgit2 0.21.4