Commit cef26674c74270fe81c2835adedba879b70dfb1f

Authored by Alex Savenko
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 39 if ($this->checkId($product->product_id)) {
40 40 print $this->count++ . "\r\n";
41 41 $url = Url::to(['catalog/product', 'product' => $product]);
  42 + $image = isset($product) ? $product->image->getImageUrl() : '/storage/no_photo.png';
42 43 $content[] = [
43 44 $product->variant->product_variant_id,
44 45 $product->category->category_id,
45 46 $product->category->name,
46 47 $product->name,
47 48 $product->price.' UAH',
48   - Yii::$app->urlManager->baseUrl.$product->image->getImageUrl(),
  49 + Yii::$app->urlManager->baseUrl.$image,
49 50 $url,
50 51 ];
51 52 }
... ...