Commit 40e4c0853017a9b1fecb3559828978e809268c16
1 parent
b6cbc977
Sitemap
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
console/SiteMapController.php
... | ... | @@ -42,7 +42,8 @@ |
42 | 42 | |
43 | 43 | public function getVariants() |
44 | 44 | { |
45 | - return Product::find() | |
45 | + return Product::find()->select('product.*', 'DISTINCT ON (product_id)') | |
46 | + ->with('lang') | |
46 | 47 | ->innerJoinWith('enabledVariants.lang'); |
47 | 48 | } |
48 | 49 | |
... | ... | @@ -243,7 +244,6 @@ |
243 | 244 | ); |
244 | 245 | $this->createRow($url, 0.9, 'Daily'); |
245 | 246 | } |
246 | - | |
247 | 247 | foreach ($this->getVariants() |
248 | 248 | ->each(1000) as $row) { |
249 | 249 | /** | ... | ... |