diff --git a/console/controllers/FeedController.php b/console/controllers/FeedController.php index 661f6f0..949c646 100755 --- a/console/controllers/FeedController.php +++ b/console/controllers/FeedController.php @@ -25,9 +25,15 @@ class FeedController extends Controller return Product::find() ->innerJoin(ProductVariant::tableName(), ProductVariant::tableName() .'.product_id = '. Product::tableName() .'.product_id') ->where(['and', ProductVariant::tableName().'.status = 0', ProductVariant::tableName().'.stock > 0']) + ->with('brand') ->all(); } - + + /** + * @param Product $product + * @param $content + */ + public function createRow( $product, &$content ){ if ($this->checkId($product->product_id)) { print $this->count++ . "\r\n"; @@ -37,7 +43,7 @@ class FeedController extends Controller $product->variant->product_variant_id, $product->category->category_id, $product->category->name, - $product->name, + $product->brand->name, $product->price.' UAH', Yii::$app->urlManager->baseUrl.$image, $url, -- libgit2 0.21.4