if (($matrixErpByGuid[$product->id]->price->price ?? 0) == 0) {
continue;
}
- $models []= new Model\UpdateOfferMappingDTO([
+ $model = [
'offer' => [
'offerId' => $product->id,
'category' => 'Цветы',
'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 );