]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-148] вывод отправляемых на маркет данных
authorAlexander Smirnov <fredeom@mail.ru>
Wed, 13 Nov 2024 12:43:44 +0000 (15:43 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Wed, 13 Nov 2024 12:43:44 +0000 (15:43 +0300)
erp24/api2/controllers/YandexMarketController.php

index c54124999d73571a890fa71c605b1a80d42d8e62..8d603fae9101149e6b0009ca7dd31eafec02c342 100644 (file)
@@ -96,7 +96,7 @@ class YandexMarketController extends Controller
             if (($matrixErpByGuid[$product->id]->price->price ?? 0) == 0) {
                 continue;
             }
-            $models []= new Model\UpdateOfferMappingDTO([
+            $model = [
                 'offer' => [
                     'offerId' => $product->id,
                     'category' => 'Цветы',
@@ -117,7 +117,9 @@ class YandexMarketController extends Controller
                     'description' => $matrixErpByGuid[$product->id]->matrixProperty->description ?? '-',
                     'pictures' => ['https://media.erp-flowers.ru/media/view-image/' . ($matrixErpByGuid[$product->id]->matrixProperty->image_id ?? null)],
                 ],
-            ]);
+            ];
+            echo "<pre>"; var_dump($model); echo "</pre>";
+            $models []= new Model\UpdateOfferMappingDTO($model);
         }
 
         $apiInstance = new Api\BusinessOfferMappingsApi(new GuzzleHttp\Client(), $config );