]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки по контроллеру feature_fomichev_erp-471_add_price_dictionary_for_fw_feed
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 2 Oct 2025 10:39:48 +0000 (13:39 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 2 Oct 2025 10:39:48 +0000 (13:39 +0300)
erp24/controllers/MarketplaceController.php
erp24/services/MarketplaceService.php

index ec28a5c57592f844936e02033349f72389d75089..5c64531e24b74187aa252ca40c53193bd37e415d 100644 (file)
@@ -23,7 +23,7 @@ class MarketplaceController extends Controller
     public function actionFeed()
     {
         // Получаем информацию о продуктах
-        $productsInfo = MarketplaceService::getAllProductsInfo(10); // Получаем 10 товаров по умолчанию
+        $productsInfo = MarketplaceService::getAllProductsInfo(10);
 
         // Генерируем XML-фид
         $xmlFeed = MarketplaceService::createXMLFeed($productsInfo);
index 4c3a73c07c050caacba5f864e7b5c23c68a9afd7..fbca72401fae49b52344f3a4da9413662acd74db 100644 (file)
@@ -309,7 +309,7 @@ class MarketplaceService
      *
      * @return array
      */
-    public static function getAllProductsInfo($id, $marketplaceId = 2) // 2 = Flowwow по умолчанию
+    public static function getAllProductsInfo(int $items, $marketplaceId = 2) // 2 = Flowwow по умолчанию
     {
         $parents = ProductsClass::find()
             ->select('category_id')
@@ -323,7 +323,7 @@ class MarketplaceService
             ->andWhere(['parent_id' => $parents])
             ->all();
 
-        $count = (int)$id;
+        $count = (int)$items;
         $selectedProducts = array_slice($products, 0, $count);
 
         $result = [];