From: Vladimir Fomichev Date: Mon, 6 Oct 2025 08:33:10 +0000 (+0300) Subject: Порядок фото во view и убрал видео в фиде X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=e7d89fb487d91ce4f1d5aac47dbcdf324c5bbf9c;p=erp24_rep%2Fyii-erp24%2F.git Порядок фото во view и убрал видео в фиде --- diff --git a/erp24/controllers/MatrixErpController.php b/erp24/controllers/MatrixErpController.php index c82762b1..b22bd971 100644 --- a/erp24/controllers/MatrixErpController.php +++ b/erp24/controllers/MatrixErpController.php @@ -189,7 +189,7 @@ class MatrixErpController extends Controller { $model = $this->findModel($id); $modelProperty = MatrixErpProperty::find()->where(['guid' => $model->guid])->one(); - $matrixErpMedia = MatrixErpMedia::find()->where(['guid' => $model->guid])->with('file')->all(); + $matrixErpMedia = MatrixErpMedia::find()->where(['guid' => $model->guid])->with('file')->orderBy(['foto_order' => SORT_ASC])->all(); if (empty($modelProperty)) { $modelProperty = new MatrixErpProperty(); $modelProperty->guid = $model->guid; diff --git a/erp24/services/MarketplaceService.php b/erp24/services/MarketplaceService.php index 34c00bac..d6b882da 100644 --- a/erp24/services/MarketplaceService.php +++ b/erp24/services/MarketplaceService.php @@ -662,6 +662,7 @@ class MarketplaceService $urls = []; $data = MatrixErpMedia::find() ->where(['guid' => $guid]) + ->andWhere(['name' => 'foto']) ->all(); foreach ($data as $media) { if (!empty($media->file)) {