From cef26674c74270fe81c2835adedba879b70dfb1f Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 6 Dec 2016 14:14:40 +0200 Subject: [PATCH] remarketing --- console/controllers/FeedController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/console/controllers/FeedController.php b/console/controllers/FeedController.php index d3cc4ad..d919221 100644 --- a/console/controllers/FeedController.php +++ b/console/controllers/FeedController.php @@ -39,13 +39,14 @@ class FeedController extends Controller if ($this->checkId($product->product_id)) { print $this->count++ . "\r\n"; $url = Url::to(['catalog/product', 'product' => $product]); + $image = isset($product) ? $product->image->getImageUrl() : '/storage/no_photo.png'; $content[] = [ $product->variant->product_variant_id, $product->category->category_id, $product->category->name, $product->name, $product->price.' UAH', - Yii::$app->urlManager->baseUrl.$product->image->getImageUrl(), + Yii::$app->urlManager->baseUrl.$image, $url, ]; } -- libgit2 0.21.4