Commit 31aec751f505dba431db31867f5069c8dcbf0c6d
1 parent
514e6d8b
sitemap generator update
Showing
1 changed file
with
19 additions
and
19 deletions
Show diff stats
console/controllers/SiteMapController.php
@@ -193,25 +193,25 @@ class SiteMapController extends Controller | @@ -193,25 +193,25 @@ class SiteMapController extends Controller | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | ||
196 | -// foreach($this->getCategories() as $category){ | ||
197 | -// foreach ($this->getFilters($category) as $filter1) { | ||
198 | -// foreach ($this->getFilters($category) as $filter2) { | ||
199 | -// if($this->checkFilter($category, [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] )){ | ||
200 | -// $url = Url::to(['catalog/category', 'category' => $category, 'filters' => [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] ]); | ||
201 | -// $this->createRow($url , 0.7, $content); | ||
202 | -// } | ||
203 | -// | ||
204 | -// } | ||
205 | -// | ||
206 | -// foreach ($this->getBrands($category) as $brand) { | ||
207 | -// if($this->checkFilter($category, ['brands' => [$brand->brand_id], $filter1['group_alias'] => [$filter1['option_alias']]] )){ | ||
208 | -// $url = Url::to(['catalog/category', 'category' => $category, 'filters' => ['brands' => [$brand->alias],$filter1['group_alias'] => [$filter1['option_alias']]]]); | ||
209 | -// $this->createRow($url , 0.7,$content); | ||
210 | -// } | ||
211 | -// | ||
212 | -// } | ||
213 | -// } | ||
214 | -// } | 196 | + foreach($this->getCategories() as $category){ |
197 | + foreach ($this->getFilters($category) as $filter1) { | ||
198 | + foreach ($this->getFilters($category) as $filter2) { | ||
199 | + if($this->checkFilter($category, [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] )){ | ||
200 | + $url = Url::to(['catalog/category', 'category' => $category, 'filters' => [$filter1['group_alias'] => [$filter1['option_alias']],$filter2['group_alias'] => [$filter2['option_alias']]] ]); | ||
201 | + $this->createRow($url , 0.7, $content); | ||
202 | + } | ||
203 | + | ||
204 | + } | ||
205 | + | ||
206 | + foreach ($this->getBrands($category) as $brand) { | ||
207 | + if($this->checkFilter($category, ['brands' => [$brand->brand_id], $filter1['group_alias'] => [$filter1['option_alias']]] )){ | ||
208 | + $url = Url::to(['catalog/category', 'category' => $category, 'filters' => ['brands' => [$brand->alias],$filter1['group_alias'] => [$filter1['option_alias']]]]); | ||
209 | + $this->createRow($url , 0.7,$content); | ||
210 | + } | ||
211 | + | ||
212 | + } | ||
213 | + } | ||
214 | + } | ||
215 | 215 | ||
216 | 216 | ||
217 | 217 |