Commit cef26674c74270fe81c2835adedba879b70dfb1f
1 parent
7f2d2d4f
remarketing
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
console/controllers/FeedController.php
@@ -39,13 +39,14 @@ class FeedController extends Controller | @@ -39,13 +39,14 @@ class FeedController extends Controller | ||
39 | if ($this->checkId($product->product_id)) { | 39 | if ($this->checkId($product->product_id)) { |
40 | print $this->count++ . "\r\n"; | 40 | print $this->count++ . "\r\n"; |
41 | $url = Url::to(['catalog/product', 'product' => $product]); | 41 | $url = Url::to(['catalog/product', 'product' => $product]); |
42 | + $image = isset($product) ? $product->image->getImageUrl() : '/storage/no_photo.png'; | ||
42 | $content[] = [ | 43 | $content[] = [ |
43 | $product->variant->product_variant_id, | 44 | $product->variant->product_variant_id, |
44 | $product->category->category_id, | 45 | $product->category->category_id, |
45 | $product->category->name, | 46 | $product->category->name, |
46 | $product->name, | 47 | $product->name, |
47 | $product->price.' UAH', | 48 | $product->price.' UAH', |
48 | - Yii::$app->urlManager->baseUrl.$product->image->getImageUrl(), | 49 | + Yii::$app->urlManager->baseUrl.$image, |
49 | $url, | 50 | $url, |
50 | ]; | 51 | ]; |
51 | } | 52 | } |